24 #define mrb_class_ptr(v) ((struct RClass*)(mrb_ptr(v))) 29 switch (mrb_type(v)) {
32 return mrb->false_class;
33 return mrb->nil_class;
35 return mrb->true_class;
37 return mrb->symbol_class;
39 return mrb->fixnum_class;
40 #ifndef MRB_WITHOUT_FLOAT 42 return mrb->float_class;
45 return mrb->object_class;
49 return mrb_obj_ptr(v)->c;
61 #define MRB_FL_CLASS_IS_PREPENDED (1 << 19) 62 #define MRB_FL_CLASS_IS_ORIGIN (1 << 18) 63 #define MRB_CLASS_ORIGIN(c) do {\ 64 if ((c)->flags & MRB_FL_CLASS_IS_PREPENDED) {\ 66 while (!((c)->flags & MRB_FL_CLASS_IS_ORIGIN)) {\ 71 #define MRB_FL_CLASS_IS_INHERITED (1 << 17) 72 #define MRB_INSTANCE_TT_MASK (0xFF) 73 #define MRB_SET_INSTANCE_TT(c, tt) ((c)->flags = (((c)->flags & ~MRB_INSTANCE_TT_MASK) | (char)(tt))) 74 #define MRB_INSTANCE_TT(c) (enum mrb_vtype)((c)->flags & MRB_INSTANCE_TT_MASK)
Definition: variable.c:25
Class class.
Definition: class.h:17
#define MRB_BEGIN_DECL
Start declarations in C mode.
Definition: common.h:26
mrb_value(* mrb_func_t)(struct mrb_state *mrb, mrb_value self)
Function pointer type for a function callable by mruby.
Definition: mruby.h:189
#define MRB_API
Declare a public MRuby API function.
Definition: common.h:73
Specifies the number of arguments a function takes.
#define MRB_END_DECL
End declarations in C mode.
Definition: common.h:28
mruby common platform definition"
Definition: boxing_nan.h:39
#define MRB_INLINE
Declare a function as always inlined.
Definition: common.h:62