diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 17:06:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 17:06:07 +0900 |
| commit | 74c9502bd45fd70926c86ce564c2d5d1df9a6dd0 (patch) | |
| tree | 4dbf22f15e482bf082712286bcf0daa5e51aa41c /src/class.c | |
| parent | 1341e53961b3e99ac67d803e5ead677e976d18c4 (diff) | |
| parent | 456878ba06358a77d4ab9312fdc69bf780f8fdf4 (diff) | |
| download | mruby-74c9502bd45fd70926c86ce564c2d5d1df9a6dd0.tar.gz mruby-74c9502bd45fd70926c86ce564c2d5d1df9a6dd0.zip | |
Merge branch 'improve-source-scanning-for-presym' of https://github.com/shuujii/mruby into shuujii-improve-source-scanning-for-presym
Diffstat (limited to 'src/class.c')
| -rw-r--r-- | src/class.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c index 270d8885f..85a26d343 100644 --- a/src/class.c +++ b/src/class.c @@ -2792,7 +2792,8 @@ static const mrb_code new_iseq[] = { OP_RETURN, 0x0 /* OP_RETURN R0 */ }; -const mrb_sym new_syms[] = { MRB_SYM(allocate), MRB_SYM(initialize) }; +MRB_PRESYM_DEFINE_VAR_AND_INITER(new_syms, 2, MRB_SYM(allocate), MRB_SYM(initialize)) + static const mrb_irep new_irep = { 3, 6, 0, MRB_IREP_STATIC, new_iseq, NULL, new_syms, NULL, NULL, NULL, @@ -2805,6 +2806,7 @@ init_class_new(mrb_state *mrb, struct RClass *cls) struct RProc *p; mrb_method_t m; + init_new_syms(mrb); p = mrb_proc_new(mrb, &new_irep); MRB_METHOD_FROM_PROC(m, p); mrb_define_method_raw(mrb, cls, MRB_SYM(new), m); |
