Use type predicate macros instead of mrb_type if possible

For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
This commit is contained in:
KOBAYASHI Shuji
2019-09-26 22:23:27 +09:00
parent 60cc46a92c
commit feaf80d899
27 changed files with 112 additions and 55 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ inspect_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p)
s = mrb_sym_name_len(mrb, sym, &len);
mrb_str_cat(mrb, str, s, len);
mrb_str_cat_lit(mrb, str, "=");
if (mrb_type(v) == MRB_TT_OBJECT) {
if (mrb_object_p(v)) {
ins = mrb_any_to_s(mrb, v);
}
else {