]> granicus.if.org Git - python/commitdiff
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
authorRaymond Hettinger <python@rcn.com>
Tue, 27 Jan 2015 06:06:43 +0000 (22:06 -0800)
committerRaymond Hettinger <python@rcn.com>
Tue, 27 Jan 2015 06:06:43 +0000 (22:06 -0800)
Objects/setobject.c

index 673490d6b8e85693aeb4d90b88d8bcf0bd1618ae..d36bc0b3c193c2e272312408b6d86e0f32102ff2 100644 (file)
@@ -85,10 +85,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
             if (cmp > 0)                                          /* likely */
                 return entry;
         }
-        if (entry->hash == -1 && freeslot == NULL) {
-            assert(entry->key == dummy);
+        if (entry->key == dummy && freeslot == NULL)
             freeslot = entry;
-        }
 
         for (j = 1 ; j <= LINEAR_PROBES ; j++) {
             entry = &table[(i + j) & mask];
@@ -113,10 +111,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
                 if (cmp > 0)
                     return entry;
             }
-            if (entry->hash == -1 && freeslot == NULL) {
-                assert(entry->key == dummy);
+            if (entry->key == dummy && freeslot == NULL)
                 freeslot = entry;
-            }
         }
 
         perturb >>= PERTURB_SHIFT;