summaryrefslogtreecommitdiffhomepage
path: root/src/error.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-11-18 16:24:42 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2013-11-18 16:24:42 -0800
commitf9b14f49e6415ff9dcb0d5dee11c93f6fec5ec5c (patch)
treef8f080c8d11c501d5382d21021d073b39cad53b1 /src/error.c
parente4c2f9c14fac2c0dbc6b7489c9637ea25846da19 (diff)
parentaacadb23657fb244821aac891a3eec8aac2f707a (diff)
downloadmruby-f9b14f49e6415ff9dcb0d5dee11c93f6fec5ec5c.tar.gz
mruby-f9b14f49e6415ff9dcb0d5dee11c93f6fec5ec5c.zip
Merge pull request #1584 from cremno/rename-mrb_exc_new3
renamed mrb_exc_new3 to mrb_exc_new_str
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.c b/src/error.c
index 10ba6170f..c12d2ed71 100644
--- a/src/error.c
+++ b/src/error.c
@@ -25,7 +25,7 @@ mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len)
}
mrb_value
-mrb_exc_new3(mrb_state *mrb, struct RClass* c, mrb_value str)
+mrb_exc_new_str(mrb_state *mrb, struct RClass* c, mrb_value str)
{
str = mrb_str_to_str(mrb, str);
return mrb_funcall(mrb, mrb_obj_value(c), "new", 1, str);
@@ -231,7 +231,7 @@ mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg)
{
mrb_value mesg;
mesg = mrb_str_new_cstr(mrb, msg);
- mrb_exc_raise(mrb, mrb_exc_new3(mrb, c, mesg));
+ mrb_exc_raise(mrb, mrb_exc_new_str(mrb, c, mesg));
}
mrb_value
@@ -297,7 +297,7 @@ mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt, ...)
va_start(args, fmt);
mesg = mrb_vformat(mrb, fmt, args);
va_end(args);
- mrb_exc_raise(mrb, mrb_exc_new3(mrb, c, mesg));
+ mrb_exc_raise(mrb, mrb_exc_new_str(mrb, c, mesg));
}
void
@@ -376,7 +376,7 @@ make_exception(mrb_state *mrb, int argc, mrb_value *argv, int isstr)
if (isstr) {
mesg = mrb_check_string_type(mrb, argv[0]);
if (!mrb_nil_p(mesg)) {
- mesg = mrb_exc_new3(mrb, E_RUNTIME_ERROR, mesg);
+ mesg = mrb_exc_new_str(mrb, E_RUNTIME_ERROR, mesg);
break;
}
}