summaryrefslogtreecommitdiffhomepage
path: root/src/hash.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-26 17:53:04 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 18:19:54 +0900
commit2b188ed8a191257f23ddf6f8a27bf1d3964587ed (patch)
treebccc235fdf9088a5486201c3855bfb2bfe04a1f2 /src/hash.c
parent2bb84f1f1ae4bfca49bd92d8d0102a5773d3270f (diff)
downloadmruby-2b188ed8a191257f23ddf6f8a27bf1d3964587ed.tar.gz
mruby-2b188ed8a191257f23ddf6f8a27bf1d3964587ed.zip
Reorganize `Integer` system.
- Integrate `Fixnum` and `Integer` - Remove `Integral` - `int / int -> int` - Replace `mrb_fixnum()` to `mrb_int()` - Replace `mrb_fixnum_value()` to `mrb_int_value()`. - Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c
index 79cec4b71..d67fa6254 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -73,7 +73,7 @@ ht_hash_func(mrb_state *mrb, htable *t, mrb_value key)
default:
hv = mrb_funcall_id(mrb, key, MRB_SYM(hash), 0);
- h = (size_t)tt ^ (size_t)mrb_fixnum(hv);
+ h = (size_t)tt ^ (size_t)mrb_integer(hv);
break;
}
if (index && (index != t->index || capa != index->capa)) {
@@ -96,8 +96,8 @@ ht_hash_equal(mrb_state *mrb, htable *t, mrb_value a, mrb_value b)
return mrb_symbol(a) == mrb_symbol(b);
case MRB_TT_INTEGER:
- if (!mrb_fixnum_p(b)) return FALSE;
- return mrb_fixnum(a) == mrb_fixnum(b);
+ if (!mrb_integer_p(b)) return FALSE;
+ return mrb_integer(a) == mrb_integer(b);
#ifndef MRB_NO_FLOAT
case MRB_TT_FLOAT: