From f8d1a31e70601f73a89b9f5aa9a8604df64743ac Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 26 Jan 2015 22:06:43 -0800 Subject: Revert unintended part of the commit (the key==dummy test wasn't supposed to change). --- Objects/setobject.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Objects/setobject.c b/Objects/setobject.c index 673490d..d36bc0b 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -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; -- cgit v0.12