[Python-checkins] cpython: Revert unintended part of the commit (the key==dummy test wasn't supposed to
raymond.hettinger
python-checkins at python.org
Tue Jan 27 07:07:05 CET 2015
https://hg.python.org/cpython/rev/5ed1db00dc59
changeset: 94334:5ed1db00dc59
user: Raymond Hettinger <python at rcn.com>
date: Mon Jan 26 22:06:43 2015 -0800
summary:
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
files:
Objects/setobject.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Objects/setobject.c b/Objects/setobject.c
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -85,10 +85,8 @@
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 @@
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;
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list