diff options
| -rw-r--r-- | Rakefile | 14 | ||||
| -rw-r--r-- | include/mruby/presym.h | 2 | ||||
| -rw-r--r-- | src/symbol.c | 4 |
3 files changed, 10 insertions, 10 deletions
@@ -181,24 +181,24 @@ file presym_inc => presym_file do if /\A\w+\Z/ =~ sym f.print "MRB_PRESYM_CSYM(#{sym}, #{i+1})\n" elsif op_table.key?(sym) - f.print "MRB_PRESYM_QSYM(#{sym}, #{op_table[sym]}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{op_table[sym]}, #{i+1})\n" elsif /\?\Z/ =~ sym s = sym.dup; s[-1] = "_p" - f.print "MRB_PRESYM_QSYM(#{sym}, #{s}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{s}, #{i+1})\n" elsif /\!\Z/ =~ sym s = sym.dup; s[-1] = "_b" - f.print "MRB_PRESYM_QSYM(#{sym}, #{s}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{s}, #{i+1})\n" elsif /\=\Z/ =~ sym s = sym.dup; s[-1] = "_e" - f.print "MRB_PRESYM_QSYM(#{sym}, #{s}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{s}, #{i+1})\n" elsif /\A@/ =~ sym s = sym.dup; s[0] = "a_" - f.print "MRB_PRESYM_QSYM(#{sym}, #{s}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{s}, #{i+1})\n" elsif /\A$/ =~ sym s = sym.dup; s[0] = "d_" - f.print "MRB_PRESYM_QSYM(#{sym}, #{s}, #{i+1})\n" + f.print "MRB_PRESYM_QSYM(\"#{sym}\", #{s}, #{i+1})\n" else - f.print "MRB_PRESYM_SYM(#{sym}, #{i+1})\n" + f.print "MRB_PRESYM_SYM(\"#{sym}\", #{i+1})\n" end end f.print "#define MRB_PRESYM_MAX #{presyms.size}" diff --git a/include/mruby/presym.h b/include/mruby/presym.h index 33e51fe18..3cc12e8fb 100644 --- a/include/mruby/presym.h +++ b/include/mruby/presym.h @@ -9,7 +9,7 @@ #undef MRB_PRESYM_MAX #define MRB_PRESYM_CSYM(sym, num) MRB_PRESYM__##sym = (num<<1), -#define MRB_PRESYM_QSYM(src, sym, num) MRB_PRESYM_q_##sym = (num<<1), +#define MRB_PRESYM_QSYM(str, sym, num) MRB_PRESYM_q_##sym = (num<<1), #define MRB_PRESYM_SYM(sym, num) enum mruby_presym { diff --git a/src/symbol.c b/src/symbol.c index 6a72a83c6..9981bad7c 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -17,8 +17,8 @@ #undef MRB_PRESYM_QSYM #undef MRB_PRESYM_SYM #define MRB_PRESYM_CSYM(sym, num) #sym, -#define MRB_PRESYM_QSYM(sym, name, num) #sym, -#define MRB_PRESYM_SYM(sym, num) #sym, +#define MRB_PRESYM_QSYM(str, name, num) str, +#define MRB_PRESYM_SYM(str, num) str, static const char *presym_table[] = { #include <../build/presym.inc> |
