mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
asserts checking validity of pointer and TT added for mrb_obj_value
Useful for testing when using boxing on different platforms.
This commit is contained in:
@@ -211,6 +211,8 @@ mrb_obj_value(void *p)
|
||||
{
|
||||
mrb_value v;
|
||||
SET_OBJ_VALUE(v, (struct RBasic*)p);
|
||||
mrb_assert(p == mrb_ptr(v));
|
||||
mrb_assert(((struct RBasic*)p)->tt == mrb_type(v));
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user