[前][次][番号順一覧][スレッド一覧]

ruby-changes:54517

From: ko1 <ko1@a...>
Date: Sun, 6 Jan 2019 07:42:03 +0900 (JST)
Subject: [ruby-changes:54517] ko1:r66732 (trunk): fix last commit.

ko1	2019-01-06 07:41:59 +0900 (Sun, 06 Jan 2019)

  New Revision: 66732

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66732

  Log:
    fix last commit.

  Modified files:
    trunk/hash.c
Index: hash.c
===================================================================
--- hash.c	(revision 66731)
+++ hash.c	(revision 66732)
@@ -587,10 +587,6 @@ ar_alloc_table(VALUE hash) https://github.com/ruby/ruby/blob/trunk/hash.c#L587
     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 https://github.com/ruby/ruby/blob/trunk/hash.c#L607
     /* 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;
         }
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]