diff options
-rw-r--r-- | Objects/setobject.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index ff832d5..9bdbbba 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -115,33 +115,6 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash) if (entry->key == dummy && freeslot == NULL) freeslot = entry; } - } else { - for (j = 1 ; j <= LINEAR_PROBES ; j++) { - entry = &table[(i + j) & mask]; - if (entry->key == NULL) - goto found_null; - if (entry->hash == hash) { - PyObject *startkey = entry->key; - assert(startkey != dummy); - if (startkey == key) - return entry; - if (PyUnicode_CheckExact(startkey) - && PyUnicode_CheckExact(key) - && unicode_eq(startkey, key)) - return entry; - Py_INCREF(startkey); - cmp = PyObject_RichCompareBool(startkey, key, Py_EQ); - Py_DECREF(startkey); - if (cmp < 0) - return NULL; - if (table != so->table || entry->key != startkey) - return set_lookkey(so, key, hash); - if (cmp > 0) - return entry; - } - if (entry->key == dummy && freeslot == NULL) - freeslot = entry; - } } perturb >>= PERTURB_SHIFT; @@ -183,12 +156,6 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash) if (entry->key == NULL) goto found_null; } - } else { - for (j = 1; j <= LINEAR_PROBES; j++) { - entry = &table[(i + j) & mask]; - if (entry->key == NULL) - goto found_null; - } } perturb >>= PERTURB_SHIFT; i = (i * 5 + 1 + perturb) & mask; |