add read barrier to value.p

API changes:
- value.p must be accessed via mrb_value_p macro
- value.p must be mutated via MRB_SET_VALUE_P macro
This commit is contained in:
Yuichi Nishiwaki
2013-08-03 14:03:44 -07:00
parent 9b4d071833
commit 8dc2fa3bc8
13 changed files with 37 additions and 34 deletions
+4 -4
View File
@@ -18,10 +18,10 @@ struct RClass {
struct RClass *super;
};
#define mrb_class_ptr(v) ((struct RClass*)((v).value.p))
#define RCLASS_SUPER(v) (((struct RClass*)((v).value.p))->super)
#define RCLASS_IV_TBL(v) (((struct RClass*)((v).value.p))->iv)
#define RCLASS_M_TBL(v) (((struct RClass*)((v).value.p))->mt)
#define mrb_class_ptr(v) ((struct RClass*)(mrb_value_p(v)))
#define RCLASS_SUPER(v) (((struct RClass*)(mrb_value_p(v)))->super)
#define RCLASS_IV_TBL(v) (((struct RClass*)(mrb_value_p(v)))->iv)
#define RCLASS_M_TBL(v) (((struct RClass*)(mrb_value_p(v)))->mt)
static inline struct RClass*
mrb_class(mrb_state *mrb, mrb_value v)