summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 22:41:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-05 22:41:59 +0000
commitfc7f99066608286f70fabcdec221e1502d40695b (patch)
tree0d19c38ba573fd1c21b58beae6fca5dcc58c7eca /hash.c
parent93583166c8cc9b28d36d8f4f8e23fe968849498c (diff)
fix last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index f9ec221d4f..7395eb5914 100644
--- a/hash.c
+++ b/hash.c
@@ -587,10 +587,6 @@ ar_alloc_table(VALUE hash)
return tab;
}
-#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))
-
static inline int
ar_equal(VALUE x, VALUE y)
{
@@ -611,7 +607,7 @@ ar_find_entry(VALUE hash, st_hash_t hash_value, st_data_t key)
/* if table is NULL, then bound also should be 0 */
for (i = 0; i < bound; i++) {
- if (PTR_EQUAL(RHASH_AR_TABLE_REF(hash, i), hash_value, key)) {
+ if (ar_ptr_equal(RHASH_AR_TABLE_REF(hash, i), hash_value, key)) {
return i;
}
}