mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_raisef(): new function. Same as previou version of mrb_raise().
mrb_raise(): API modified. It cannot treat variable arguments.
This commit is contained in:
+2
-2
@@ -348,7 +348,7 @@ mrb_obj_clone(mrb_state *mrb, mrb_value self)
|
||||
struct RObject *clone;
|
||||
|
||||
if (mrb_special_const_p(self)) {
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "can't clone %s", mrb_obj_classname(mrb, self));
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't clone %s", mrb_obj_classname(mrb, self));
|
||||
}
|
||||
clone = (struct RObject*)mrb_obj_alloc(mrb, mrb_type(self), mrb_obj_class(mrb, self));
|
||||
clone->c = mrb_singleton_class_clone(mrb, self);
|
||||
@@ -383,7 +383,7 @@ mrb_obj_dup(mrb_state *mrb, mrb_value obj)
|
||||
mrb_value dup;
|
||||
|
||||
if (mrb_special_const_p(obj)) {
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "can't dup %s", mrb_obj_classname(mrb, obj));
|
||||
mrb_raisef(mrb, E_TYPE_ERROR, "can't dup %s", mrb_obj_classname(mrb, obj));
|
||||
}
|
||||
p = mrb_obj_alloc(mrb, mrb_type(obj), mrb_obj_class(mrb, obj));
|
||||
dup = mrb_obj_value(p);
|
||||
|
||||
Reference in New Issue
Block a user