diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-04-25 14:29:58 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:20:41 +0900 |
| commit | eddd3249793b3b307da2fe7734d5923cd238a35b (patch) | |
| tree | 8575bd761c26472c9dbb6a81cdeb65a2b3ecc3bd /src/array.c | |
| parent | f221f4e0fa08da25498042b2cd61331af40294e5 (diff) | |
| download | mruby-eddd3249793b3b307da2fe7734d5923cd238a35b.tar.gz mruby-eddd3249793b3b307da2fe7734d5923cd238a35b.zip | |
Add `MRB_SYM()` for inline symbols.
Diffstat (limited to 'src/array.c')
| -rw-r--r-- | src/array.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/array.c b/src/array.c index c33641264..567ed7d8b 100644 --- a/src/array.c +++ b/src/array.c @@ -1312,11 +1312,11 @@ init_ary_each(mrb_state *mrb, struct RClass *ary) *each_irep = mrb_irep_zero; each_irep->syms = (mrb_sym*)mrb_malloc(mrb, sizeof(mrb_sym)*5); - each_irep->syms[0] = mrb_intern_lit(mrb, "each"); - each_irep->syms[1] = mrb_intern_lit(mrb, "to_enum"); + each_irep->syms[0] = MRB_SYM(each); + each_irep->syms[1] = MRB_SYM(to_enum); each_irep->syms[2] = mrb_intern_lit(mrb, "[]"); - each_irep->syms[3] = mrb_intern_lit(mrb, "call"); - each_irep->syms[4] = mrb_intern_lit(mrb, "length"); + each_irep->syms[3] = MRB_SYM(call); + each_irep->syms[4] = MRB_SYM(length); each_irep->slen = 5; each_irep->flags = MRB_ISEQ_NO_FREE; each_irep->iseq = each_iseq; @@ -1326,7 +1326,7 @@ init_ary_each(mrb_state *mrb, struct RClass *ary) p = mrb_proc_new(mrb, each_irep); p->flags |= MRB_PROC_SCOPE | MRB_PROC_STRICT; MRB_METHOD_FROM_PROC(m, p); - mrb_define_method_raw(mrb, ary, mrb_intern_lit(mrb, "each"), m); + mrb_define_method_raw(mrb, ary, MRB_SYM(each), m); } void |
