mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
change class argument of mrb_const_defined_at from struct RClass* to mrb_value to make it consistent with mrb_const_defined; ref #2593
This commit is contained in:
+6
-5
@@ -1081,9 +1081,10 @@ mrb_f_global_variables(mrb_state *mrb, mrb_value self)
|
||||
}
|
||||
|
||||
static mrb_bool
|
||||
mrb_const_defined_0(mrb_state *mrb, struct RClass *klass, mrb_sym id, mrb_bool exclude, mrb_bool recurse)
|
||||
mrb_const_defined_0(mrb_state *mrb, mrb_value mod, mrb_sym id, mrb_bool exclude, mrb_bool recurse)
|
||||
{
|
||||
struct RClass * tmp;
|
||||
struct RClass *klass = mrb_class_ptr(mod);
|
||||
struct RClass *tmp;
|
||||
mrb_bool mod_retry = 0;
|
||||
|
||||
tmp = klass;
|
||||
@@ -1106,13 +1107,13 @@ retry:
|
||||
MRB_API mrb_bool
|
||||
mrb_const_defined(mrb_state *mrb, mrb_value mod, mrb_sym id)
|
||||
{
|
||||
return mrb_const_defined_0(mrb, mrb_class_ptr(mod), id, TRUE, TRUE);
|
||||
return mrb_const_defined_0(mrb, mod, id, TRUE, TRUE);
|
||||
}
|
||||
|
||||
MRB_API mrb_bool
|
||||
mrb_const_defined_at(mrb_state *mrb, struct RClass *klass, mrb_sym id)
|
||||
mrb_const_defined_at(mrb_state *mrb, mrb_value mod, mrb_sym id)
|
||||
{
|
||||
return mrb_const_defined_0(mrb, klass, id, TRUE, FALSE);
|
||||
return mrb_const_defined_0(mrb, mod, id, TRUE, FALSE);
|
||||
}
|
||||
|
||||
MRB_API mrb_value
|
||||
|
||||
Reference in New Issue
Block a user