From 8cfc1a45816048f21d4851db0822b19c65a9520a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 13 Oct 2024 21:59:42 +0900 Subject: [PATCH] variable.c: fix int and mrb_bool confusion --- src/variable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/variable.c b/src/variable.c index c4eacff8a..e6921a7bf 100644 --- a/src/variable.c +++ b/src/variable.c @@ -115,9 +115,9 @@ iv_get(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value *vp) { int hash, pos, start; - if (t == NULL) return FALSE; - if (t->alloc == 0) return FALSE; - if (t->size == 0) return FALSE; + if (t == NULL) return 0; + if (t->alloc == 0) return 0; + if (t->size == 0) return 0; mrb_sym *keys = (mrb_sym*)&t->ptr[t->alloc]; mrb_value *vals = t->ptr; @@ -613,7 +613,7 @@ mrb_mod_cv_get(mrb_state *mrb, struct RClass *c, mrb_sym sym) { struct RClass * cls = c; mrb_value v; - int given = FALSE; + mrb_bool given = FALSE; while (c) { if (iv_get(mrb, class_iv_ptr(c), sym, &v)) {