summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-01-27 06:06:43 (GMT)
committerRaymond Hettinger <python@rcn.com>2015-01-27 06:06:43 (GMT)
commitf8d1a31e70601f73a89b9f5aa9a8604df64743ac (patch)
treef04a8e56a54022f5ada85df8420338dd0eb79347 /Objects/setobject.c
parenta5ebbf6295fef4e9033774f5c711a53407d766c9 (diff)
downloadcpython-f8d1a31e70601f73a89b9f5aa9a8604df64743ac.zip
cpython-f8d1a31e70601f73a89b9f5aa9a8604df64743ac.tar.gz
cpython-f8d1a31e70601f73a89b9f5aa9a8604df64743ac.tar.bz2
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c8
1 files 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;