From 89f591485b91780c213f459f840111a99adca9d0 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Wed, 11 Nov 2020 23:59:45 +0900 Subject: Change name and usage of presym macros To be also able to build mruby without presym in the future. However, `MRB_QSYM` has been removed and changed as follows: ### Example | Type | Symbol | Previous Style | New Style | |---------------------------|--------|------------------|----------------| | Operator | & | MRB_QSYM(and) | MRB_OPSYM(and) | | Class Variable | @@foo | MRB_QSYM(00_foo) | MRB_CVSYM(foo) | | Instance Variable | @foo | MRB_QSYM(0_foo) | MRB_IVSYM(foo) | | Method with Bang | foo! | MRB_QSYM(foo_b) | MRB_SYM_B(foo) | | Method with Question mark | foo? | MRB_QSYM(foo_p) | MRB_SYM_Q(foo) | | Mmethod with Equal | foo= | MRB_QSYM(foo_e) | MRB_SYM_E(foo) | This change makes it possible to define, for example, `MRB_IVSYM(foo)` as `mrb_intern_lit(mrb, "@" "foo")`, which is useful if we support building without presym in the future. --- src/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/array.c') diff --git a/src/array.c b/src/array.c index 8827cba9e..4125e876e 100644 --- a/src/array.c +++ b/src/array.c @@ -1314,7 +1314,7 @@ static const mrb_code each_iseq[] = { static const mrb_sym each_syms[] = { MRB_SYM(each), MRB_SYM(to_enum), - MRB_QSYM(aref), + MRB_OPSYM(aref), MRB_SYM(call), MRB_SYM(length), }; -- cgit v1.2.3