mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
This commit is contained in:
parent
a5ebbf6295
commit
f8d1a31e70
1 changed files with 2 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue