diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-09-26 22:23:27 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-09-26 22:23:27 +0900 |
| commit | feaf80d8996340bd0316fda72418b1abd774bd59 (patch) | |
| tree | 43801fcc666b937f60086b0d51271bb28eab1cc0 /mrbgems/mruby-fiber | |
| parent | 60cc46a92cf93f408dac22658c6a206e882e0e04 (diff) | |
| download | mruby-feaf80d8996340bd0316fda72418b1abd774bd59.tar.gz mruby-feaf80d8996340bd0316fda72418b1abd774bd59.zip | |
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`).
Diffstat (limited to 'mrbgems/mruby-fiber')
| -rw-r--r-- | mrbgems/mruby-fiber/src/fiber.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-fiber/src/fiber.c b/mrbgems/mruby-fiber/src/fiber.c index e47849dda..e22985bd3 100644 --- a/mrbgems/mruby-fiber/src/fiber.c +++ b/mrbgems/mruby-fiber/src/fiber.c @@ -294,7 +294,7 @@ fiber_eq(mrb_state *mrb, mrb_value self) mrb_value other; mrb_get_args(mrb, "o", &other); - if (mrb_type(other) != MRB_TT_FIBER) { + if (!mrb_fiber_p(other)) { return mrb_false_value(); } return mrb_bool_value(fiber_ptr(self) == fiber_ptr(other)); |
