![]() |
mruby
2.0.1
mruby is the lightweight implementation of the Ruby language
|
Go to the source code of this file.
Macros | |
#define | MRB_INT_BIT 32 |
#define | MRB_INT_MIN (INT32_MIN>>MRB_FIXNUM_SHIFT) |
#define | MRB_INT_MAX (INT32_MAX>>MRB_FIXNUM_SHIFT) |
#define | MRB_PRIo PRIo32 |
#define | MRB_PRId PRId32 |
#define | MRB_PRIx PRIx32 |
#define | mrb_fixnum_p(o) (mrb_type(o) == MRB_TT_FIXNUM) |
#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_bool(o) (mrb_type(o) != MRB_TT_FALSE) |
#define | MRB_SYMBOL_BITSIZE (sizeof(mrb_sym) * CHAR_BIT) |
#define | MRB_SYMBOL_MAX UINT32_MAX |
#define | mrb_float_p(o) (mrb_type(o) == MRB_TT_FLOAT) |
#define | mrb_symbol_p(o) (mrb_type(o) == MRB_TT_SYMBOL) |
#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_test(o) mrb_bool(o) |
#define | mrb_ro_data_p(p) FALSE |
Typedefs | |
typedef uint32_t | mrb_sym |
typedef uint8_t | mrb_bool |
typedef int32_t | mrb_int |
typedef double | mrb_float |
Functions | |
double | mrb_float_read (const char *, char **) |
static mrb_value | mrb_float_value (struct mrb_state *mrb, mrb_float f) |
Returns a float in Ruby. More... | |
static mrb_value | mrb_cptr_value (struct mrb_state *mrb, void *p) |
static mrb_value | mrb_fixnum_value (mrb_int i) |
Returns a fixnum in Ruby. More... | |
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. More... | |
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
|
inlinestatic |
Returns a fixnum in Ruby.
Takes an integer and boxes it into an mrb_value
Returns a float in Ruby.
Takes a float and boxes it into an mrb_value