Rename MRB_OPSYM() to MRB_QSYM().

Where `QSYM` means quoted symbols, which cannot be represented C
symbols, so specify aliases instead.

- operators: name of the operation, e.g. add for `+`
- predicates: add `_p` suffix instead of `?`
- bang methods: add `_b` suffix instead of `!`
- instance variables: add `a_` prefix instead of `@`
- global variables: add `d_` prefix instead of `@`
- class variables: unsupported; don't use them
This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-05-15 18:04:57 +09:00
parent 6128ae61a8
commit 246c76e261
4 changed files with 20 additions and 8 deletions
+1 -1
View File
@@ -766,7 +766,7 @@ mrb_obj_ceqq(mrb_state *mrb, mrb_value self)
{
mrb_value v = mrb_get_arg1(mrb);
mrb_int i, len;
mrb_sym eqq = MRB_OPSYM(eqq);
mrb_sym eqq = MRB_QSYM(eqq);
mrb_value ary;
if (mrb_array_p(self)) {
+2 -2
View File
@@ -14,10 +14,10 @@
#undef MRB_PRESYM_MAX
#undef MRB_PRESYM_CSYM
#undef MRB_PRESYM_OPSYM
#undef MRB_PRESYM_QSYM
#undef MRB_PRESYM_SYM
#define MRB_PRESYM_CSYM(sym, num) #sym,
#define MRB_PRESYM_OPSYM(op, sym, num) #op,
#define MRB_PRESYM_QSYM(sym, name, num) #sym,
#define MRB_PRESYM_SYM(sym, num) #sym,
static const char *presym_table[] = {