From feaf80d8996340bd0316fda72418b1abd774bd59 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Thu, 26 Sep 2019 22:23:27 +0900 Subject: 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`). --- src/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/object.c') diff --git a/src/object.c b/src/object.c index ee36da320..0b83c97a3 100644 --- a/src/object.c +++ b/src/object.c @@ -384,7 +384,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) else if (mrb_fixnum_p(x)) { etype = "Fixnum"; } - else if (mrb_type(x) == MRB_TT_SYMBOL) { + else if (mrb_symbol_p(x)) { etype = "Symbol"; } else if (mrb_immediate_p(x)) { -- cgit v1.2.3