mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -9,7 +9,7 @@
|
||||
|
||||
#undef MRB_PRESYM_MAX
|
||||
#define MRB_PRESYM_CSYM(sym, num) MRB_PRESYM__##sym = (num<<1),
|
||||
#define MRB_PRESYM_OPSYM(op, sym, num) MRB_PRESYM_op_##sym = (num<<1),
|
||||
#define MRB_PRESYM_QSYM(src, sym, num) MRB_PRESYM_q_##sym = (num<<1),
|
||||
#define MRB_PRESYM_SYM(sym, num)
|
||||
|
||||
enum mruby_presym {
|
||||
@@ -17,9 +17,9 @@ enum mruby_presym {
|
||||
};
|
||||
|
||||
#undef MRB_PRESYM_CSYM
|
||||
#undef MRB_PRESYM_OPSYM
|
||||
#undef MRB_PRESYM_QSYM
|
||||
#undef MRB_PRESYM_SYM
|
||||
|
||||
#define MRB_SYM(sym) MRB_PRESYM__##sym
|
||||
#define MRB_OPSYM(sym) MRB_PRESYM_op_##sym
|
||||
#define MRB_QSYM(sym) MRB_PRESYM_q_##sym
|
||||
#endif /* MRUBY_PRESYM_H */
|
||||
|
||||
Reference in New Issue
Block a user