summaryrefslogtreecommitdiffhomepage
path: root/src/load.c
diff options
context:
space:
mode:
authorcubicdaiya <[email protected]>2014-03-04 01:03:23 +0900
committercubicdaiya <[email protected]>2014-03-04 02:45:53 +0900
commit019d15c3eedb0fdb9412a3b67180da368c74bdd1 (patch)
tree5b70358a37a209a21eb716ec60233e330a8a20bc /src/load.c
parenta514e31f6b9703bf74293714b12714ee6745f872 (diff)
downloadmruby-019d15c3eedb0fdb9412a3b67180da368c74bdd1.tar.gz
mruby-019d15c3eedb0fdb9412a3b67180da368c74bdd1.zip
Use mrb_exc_new_str_lit widely
Diffstat (limited to 'src/load.c')
-rw-r--r--src/load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load.c b/src/load.c
index 857dd7740..de517f89f 100644
--- a/src/load.c
+++ b/src/load.c
@@ -12,6 +12,7 @@
#include "mruby/proc.h"
#include "mruby/string.h"
#include "mruby/debug.h"
+#include "mruby/error.h"
#if !defined(_WIN32) && SIZE_MAX < UINT32_MAX
# define SIZE_ERROR_MUL(x, y) ((x) > SIZE_MAX / (y))
@@ -467,8 +468,7 @@ mrb_read_irep(mrb_state *mrb, const uint8_t *bin)
static void
irep_error(mrb_state *mrb)
{
- static const char msg[] = "irep load error";
- mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SCRIPT_ERROR, msg, sizeof(msg) - 1));
+ mrb->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "irep load error"));
}
mrb_value