mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -25,8 +25,8 @@ struct RString {
|
||||
char *ptr;
|
||||
};
|
||||
|
||||
#define mrb_str_ptr(s) ((struct RString*)((s).value.p))
|
||||
#define RSTRING(s) ((struct RString*)((s).value.p))
|
||||
#define mrb_str_ptr(s) ((struct RString*)(mrb_value_p(s)))
|
||||
#define RSTRING(s) ((struct RString*)(mrb_value_p(s)))
|
||||
#define RSTRING_PTR(s) (RSTRING(s)->ptr)
|
||||
#define RSTRING_LEN(s) (RSTRING(s)->len)
|
||||
#define RSTRING_CAPA(s) (RSTRING(s)->aux.capa)
|
||||
|
||||
Reference in New Issue
Block a user