mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-data/data.c (mrb_data_ref): check if reader has no argument
This commit is contained in:
@@ -96,6 +96,10 @@ mrb_data_members(mrb_state *mrb, mrb_value obj)
|
||||
static mrb_value
|
||||
mrb_data_ref(mrb_state *mrb, mrb_value obj)
|
||||
{
|
||||
mrb_int argc = mrb_get_argc(mrb);
|
||||
if (argc != 0) {
|
||||
mrb_argnum_error(mrb, argc, 0, 0);
|
||||
}
|
||||
mrb_int i = mrb_integer(mrb_proc_cfunc_env_get(mrb, 0));
|
||||
mrb_value *ptr = RDATA_PTR(obj);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user