add mrb_gv_remove(); untested

This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-10-10 12:12:29 +09:00
parent 9295f6ae49
commit 400ccecf0a
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -1031,6 +1031,17 @@ mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
iv_put(mrb, t, sym, v);
}
void
mrb_gv_remove(mrb_state *mrb, mrb_sym sym)
{
iv_tbl *t;
if (!mrb->globals) {
return;
}
iv_del(mrb, mrb->globals, sym, NULL);
}
static int
gv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
{