Unverified Commit 519f3963 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4554 from shuujii/fix-missing--ifndef-MRB_ENABLE_ALL_SYMBOLS

Fix missing `#ifndef MRB_ENABLE_ALL_SYMBOLS`
parents 280a83f0 df1f1002
......@@ -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