summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 00:06:09 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 00:06:09 +0000
commit23801110085a691095fc9a8eb164880418b2215d (patch)
tree722871caf8297dbdd3cdf769034d13b7e35f1b23 /hash.c
parent3a144485fc450465ba370cdf0d5501813d5962d7 (diff)
call functions directly.
* hash.c: ar_table only supports `objhash` so we can call compare/hash functions directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index b69e8dfd5e..c87e9f7f44 100644
--- a/hash.c
+++ b/hash.c
@@ -307,7 +307,7 @@ static const struct st_hash_type identhash = {
rb_ident_hash,
};
-#define EQUAL(x,y) ((x) == (y) || (*objhash.compare)((x),(y)) == 0)
+#define EQUAL(x,y) ((x) == (y) || rb_any_cmp((x),(y)) == 0)
#define PTR_EQUAL(ptr, hash_val, key_) \
((ptr)->hash == (hash_val) && EQUAL((key_), (ptr)->key))
@@ -354,7 +354,7 @@ rb_hash_ar_table_size(void)
static inline st_hash_t
do_hash(st_data_t key)
{
- st_hash_t hash = (st_hash_t)(*objhash.hash)(key);
+ st_hash_t hash = (st_hash_t)rb_any_hash(key);
return (RESERVED_HASH_VAL == hash) ? RESERVED_HASH_SUBSTITUTION_VAL : hash;
}