diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-05 00:06:09 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-05 00:06:09 +0000 |
commit | 23801110085a691095fc9a8eb164880418b2215d (patch) | |
tree | 722871caf8297dbdd3cdf769034d13b7e35f1b23 /hash.c | |
parent | 3a144485fc450465ba370cdf0d5501813d5962d7 (diff) | |
download | ruby-23801110085a691095fc9a8eb164880418b2215d.tar.gz |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |