mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Reduce unnecessary mrb_obj_ptr() to mrb_check_frozen()
This commit is contained in:
+3
-2
@@ -504,10 +504,11 @@ MRB_API mrb_value
|
||||
mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym)
|
||||
{
|
||||
if (obj_iv_p(obj)) {
|
||||
iv_tbl *t = mrb_obj_ptr(obj)->iv;
|
||||
struct RObject *o = mrb_obj_ptr(obj);
|
||||
iv_tbl *t = o->iv;
|
||||
mrb_value val;
|
||||
|
||||
mrb_check_frozen(mrb, mrb_obj_ptr(obj));
|
||||
mrb_check_frozen(mrb, o);
|
||||
if (iv_del(mrb, t, sym, &val)) {
|
||||
return val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user