mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
fix mrb_funcall calling
This commit is contained in:
@@ -381,7 +381,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
|
||||
}
|
||||
st = make_struct(mrb, name, rest, struct_class(mrb));
|
||||
if (!mrb_nil_p(b)) {
|
||||
mrb_funcall(mrb, b, "call", 1, &st);
|
||||
mrb_funcall(mrb, b, "call", 1, st);
|
||||
}
|
||||
|
||||
return st;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ mrb_hash_ht_hash_func(mrb_state *mrb, mrb_value key)
|
||||
khint_t h = (khint_t)mrb_type(key) << 24;
|
||||
mrb_value h2;
|
||||
|
||||
h2 = mrb_funcall(mrb, key, "hash", 0, 0);
|
||||
h2 = mrb_funcall(mrb, key, "hash", 0);
|
||||
h ^= h2.value.i;
|
||||
return h;
|
||||
}
|
||||
|
||||
+1
-1
@@ -588,7 +588,7 @@ mrb_Float(mrb_state *mrb, mrb_value val)
|
||||
mrb_value
|
||||
mrb_inspect(mrb_state *mrb, mrb_value obj)
|
||||
{
|
||||
return mrb_obj_as_string(mrb, mrb_funcall(mrb, obj, "inspect", 0, 0));
|
||||
return mrb_obj_as_string(mrb, mrb_funcall(mrb, obj, "inspect", 0));
|
||||
}
|
||||
|
||||
mrb_bool
|
||||
|
||||
Reference in New Issue
Block a user