Commit df1f1002 authored by KOBAYASHI Shuji's avatar KOBAYASHI Shuji

Fix missing `#ifndef MRB_ENABLE_ALL_SYMBOLS`

parent 280a83f0
......@@ -503,9 +503,11 @@ mrb_sym2str(mrb_state *mrb, mrb_sym sym)
const char *name = mrb_sym2name_len(mrb, sym, &len);
if (!name) return mrb_undef_value(); /* can't happen */
#ifndef MRB_ENABLE_ALL_SYMBOLS
if (sym&1) { /* inline symbol */
return mrb_str_new(mrb, name, len);
}
#endif
return mrb_str_new_static(mrb, name, len);
}
......@@ -521,12 +523,12 @@ mrb_sym2name(mrb_state *mrb, mrb_sym sym)
}
else {
mrb_value str;
if (sym&1) { /* inline symbol */
#ifndef MRB_ENABLE_ALL_SYMBOLS
if (sym&1) /* inline symbol */
str = mrb_str_new(mrb, name, len);
}
else {
else
#endif
str = mrb_str_new_static(mrb, name, len);
}
str = mrb_str_dump(mrb, str);
return RSTRING_PTR(str);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment