diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-01 21:29:46 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-12-01 21:29:46 -0800 |
| commit | da8405a0f7ce7d4566afdba2243bd59a5498dfb1 (patch) | |
| tree | 9a69acf656c2d74b48c85129867fa249094b65fa /src/variable.c | |
| parent | e981f0b45cb193e395ac446762b234e16d857712 (diff) | |
| parent | df780ae5e9cb12f527f01ce04137a1ad76c0b1c6 (diff) | |
| download | mruby-da8405a0f7ce7d4566afdba2243bd59a5498dfb1.tar.gz mruby-da8405a0f7ce7d4566afdba2243bd59a5498dfb1.zip | |
Merge pull request #1600 from take-cheeze/mrb_intern_lit
Proposal of mrb_intern_lit macro.
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/variable.c b/src/variable.c index edfce99f9..efcda25c5 100644 --- a/src/variable.c +++ b/src/variable.c @@ -884,7 +884,7 @@ L_RETRY: goto L_RETRY; } name = mrb_symbol_value(sym); - return mrb_funcall_argv(mrb, mrb_obj_value(base), mrb_intern(mrb, "const_missing", 13), 1, &name); + return mrb_funcall_argv(mrb, mrb_obj_value(base), mrb_intern_lit(mrb, "const_missing"), 1, &name); } mrb_value @@ -1064,7 +1064,7 @@ mrb_f_global_variables(mrb_state *mrb, mrb_value self) buf[2] = 0; for (i = 1; i <= 9; ++i) { buf[1] = (char)(i + '0'); - mrb_ary_push(mrb, ary, mrb_symbol_value(mrb_intern(mrb, buf, 2))); + mrb_ary_push(mrb, ary, mrb_symbol_value(mrb_intern_lit(mrb, buf))); } return ary; } @@ -1127,7 +1127,7 @@ mrb_class_sym(mrb_state *mrb, struct RClass *c, struct RClass *outer) { mrb_value name; - name = mrb_obj_iv_get(mrb, (struct RObject*)c, mrb_intern(mrb, "__classid__", 11)); + name = mrb_obj_iv_get(mrb, (struct RObject*)c, mrb_intern_lit(mrb, "__classid__")); if (mrb_nil_p(name)) { if (!outer) return 0; |
