![]() |
mruby 3.3.0
mruby is the lightweight implementation of the Ruby language
|
Go to the source code of this file.
Macros | |
#define | FALSE 0 |
#define | TRUE 1 |
#define | MRB_INT_BIT 32 |
#define | MRB_INT_MIN INT32_MIN |
#define | MRB_INT_MAX INT32_MAX |
#define | MRB_PRIo PRIo32 |
#define | MRB_PRId PRId32 |
#define | MRB_PRIx PRIx32 |
#define | MRB_ENDIAN_LOHI(a, b) b a |
#define | MRB_VTYPE_FOREACH(f) |
#define | MRB_VTYPE_DEFINE(tt, type, name) tt, |
#define | MRB_TT_DATA MRB_TT_CDATA |
#define | MRB_VTYPE_TYPEOF(tt) MRB_TYPEOF_##tt |
#define | MRB_VTYPE_TYPEDEF(tt, type, name) typedef type MRB_VTYPE_TYPEOF(tt); |
#define | MRB_TT_FIXNUM MRB_TT_INTEGER |
#define | MRB_SSIZE_MAX MRB_INT_MAX |
#define | mrb_immediate_p(o) (mrb_type(o) <= MRB_TT_CPTR) |
#define | mrb_integer_p(o) (mrb_type(o) == MRB_TT_INTEGER) |
#define | mrb_fixnum_p(o) mrb_integer_p(o) |
#define | mrb_symbol_p(o) (mrb_type(o) == MRB_TT_SYMBOL) |
#define | mrb_undef_p(o) (mrb_type(o) == MRB_TT_UNDEF) |
#define | mrb_nil_p(o) (mrb_type(o) == MRB_TT_FALSE && !mrb_fixnum(o)) |
#define | mrb_false_p(o) (mrb_type(o) == MRB_TT_FALSE && !!mrb_fixnum(o)) |
#define | mrb_true_p(o) (mrb_type(o) == MRB_TT_TRUE) |
#define | mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT) |
#define | mrb_array_p(o) (mrb_type(o) == MRB_TT_ARRAY) |
#define | mrb_string_p(o) (mrb_type(o) == MRB_TT_STRING) |
#define | mrb_hash_p(o) (mrb_type(o) == MRB_TT_HASH) |
#define | mrb_cptr_p(o) (mrb_type(o) == MRB_TT_CPTR) |
#define | mrb_exception_p(o) (mrb_type(o) == MRB_TT_EXCEPTION) |
#define | mrb_free_p(o) (mrb_type(o) == MRB_TT_FREE) |
#define | mrb_object_p(o) (mrb_type(o) == MRB_TT_OBJECT) |
#define | mrb_class_p(o) (mrb_type(o) == MRB_TT_CLASS) |
#define | mrb_module_p(o) (mrb_type(o) == MRB_TT_MODULE) |
#define | mrb_iclass_p(o) (mrb_type(o) == MRB_TT_ICLASS) |
#define | mrb_sclass_p(o) (mrb_type(o) == MRB_TT_SCLASS) |
#define | mrb_proc_p(o) (mrb_type(o) == MRB_TT_PROC) |
#define | mrb_range_p(o) (mrb_type(o) == MRB_TT_RANGE) |
#define | mrb_env_p(o) (mrb_type(o) == MRB_TT_ENV) |
#define | mrb_data_p(o) (mrb_type(o) == MRB_TT_CDATA) |
#define | mrb_fiber_p(o) (mrb_type(o) == MRB_TT_FIBER) |
#define | mrb_istruct_p(o) (mrb_type(o) == MRB_TT_ISTRUCT) |
#define | mrb_break_p(o) (mrb_type(o) == MRB_TT_BREAK) |
#define | mrb_bool(o) (mrb_type(o) != MRB_TT_FALSE) |
#define | mrb_test(o) mrb_bool(o) |
#define | mrb_bigint_p(o) (mrb_type(o) == MRB_TT_BIGINT) |
#define | mrb_ro_data_p(p) FALSE |
Typedefs | |
typedef uint32_t | mrb_sym |
typedef uint8_t | mrb_bool |
typedef int32_t | mrb_int |
typedef uint32_t | mrb_uint |
typedef double | mrb_float |
typedef void | MRB_TYPEOF_MRB_TT_FALSE |
typedef void | MRB_TYPEOF_MRB_TT_TRUE |
typedef void | MRB_TYPEOF_MRB_TT_SYMBOL |
typedef void | MRB_TYPEOF_MRB_TT_UNDEF |
typedef void | MRB_TYPEOF_MRB_TT_FREE |
typedef struct RFloat | MRB_TYPEOF_MRB_TT_FLOAT |
typedef struct RInteger | MRB_TYPEOF_MRB_TT_INTEGER |
typedef struct RCptr | MRB_TYPEOF_MRB_TT_CPTR |
typedef struct RObject | MRB_TYPEOF_MRB_TT_OBJECT |
typedef struct RClass | MRB_TYPEOF_MRB_TT_CLASS |
typedef struct RClass | MRB_TYPEOF_MRB_TT_MODULE |
typedef struct RClass | MRB_TYPEOF_MRB_TT_ICLASS |
typedef struct RClass | MRB_TYPEOF_MRB_TT_SCLASS |
typedef struct RProc | MRB_TYPEOF_MRB_TT_PROC |
typedef struct RArray | MRB_TYPEOF_MRB_TT_ARRAY |
typedef struct RHash | MRB_TYPEOF_MRB_TT_HASH |
typedef struct RString | MRB_TYPEOF_MRB_TT_STRING |
typedef struct RRange | MRB_TYPEOF_MRB_TT_RANGE |
typedef struct RException | MRB_TYPEOF_MRB_TT_EXCEPTION |
typedef struct REnv | MRB_TYPEOF_MRB_TT_ENV |
typedef struct RData | MRB_TYPEOF_MRB_TT_CDATA |
typedef struct RFiber | MRB_TYPEOF_MRB_TT_FIBER |
typedef struct RArray | MRB_TYPEOF_MRB_TT_STRUCT |
typedef struct RIStruct | MRB_TYPEOF_MRB_TT_ISTRUCT |
typedef struct RBreak | MRB_TYPEOF_MRB_TT_BREAK |
typedef struct RComplex | MRB_TYPEOF_MRB_TT_COMPLEX |
typedef struct RRational | MRB_TYPEOF_MRB_TT_RATIONAL |
typedef struct RBigint | MRB_TYPEOF_MRB_TT_BIGINT |
typedef mrb_int | mrb_ssize |
Functions | |
mrb_bool | mrb_read_int (const char *p, const char *e, char **endp, mrb_int *np) |
mrb_int | mrb_int_read (const char *, const char *, char **) |
mrb_bool | mrb_read_float (const char *p, char **endp, double *fp) |
double | mrb_float_read (const char *p, char **endp) |
static mrb_value | mrb_float_value (struct mrb_state *mrb, mrb_float f) |
Returns a float in Ruby. | |
static mrb_value | mrb_cptr_value (struct mrb_state *mrb, void *p) |
static mrb_value | mrb_int_value (struct mrb_state *mrb, mrb_int i) |
Returns an integer in Ruby. | |
static mrb_value | mrb_fixnum_value (mrb_int i) |
static mrb_value | mrb_symbol_value (mrb_sym i) |
static mrb_value | mrb_obj_value (void *p) |
static mrb_value | mrb_nil_value (void) |
Get a nil mrb_value object. | |
static mrb_value | mrb_false_value (void) |
Returns false in Ruby. | |
static mrb_value | mrb_true_value (void) |
Returns true in Ruby. | |
static mrb_value | mrb_bool_value (mrb_bool boolean) |
static mrb_value | mrb_undef_value (void) |
See Copyright Notice in mruby.h
#define MRB_VTYPE_FOREACH | ( | f | ) |
Returns a float in Ruby.
Takes a float and boxes it into an mrb_value