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
+2 -2
View File
@@ -27,9 +27,9 @@ struct RArray {
mrb_value *ptr;
};
#define mrb_ary_ptr(v) ((struct RArray*)((v).value.p))
#define mrb_ary_ptr(v) ((struct RArray*)(mrb_value_p(v)))
#define mrb_ary_value(p) mrb_obj_value((void*)(p))
#define RARRAY(v) ((struct RArray*)((v).value.p))
#define RARRAY(v) ((struct RArray*)(mrb_value_p(v)))
#define RARRAY_LEN(a) (RARRAY(a)->len)
#define RARRAY_PTR(a) (RARRAY(a)->ptr)