Kaydet (Commit) f8d1a31e authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Revert unintended part of the commit (the key==dummy test wasn't supposed to change).

üst a5ebbf62
...@@ -85,10 +85,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash) ...@@ -85,10 +85,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
if (cmp > 0) /* likely */ if (cmp > 0) /* likely */
return entry; return entry;
} }
if (entry->hash == -1 && freeslot == NULL) { if (entry->key == dummy && freeslot == NULL)
assert(entry->key == dummy);
freeslot = entry; freeslot = entry;
}
for (j = 1 ; j <= LINEAR_PROBES ; j++) { for (j = 1 ; j <= LINEAR_PROBES ; j++) {
entry = &table[(i + j) & mask]; entry = &table[(i + j) & mask];
...@@ -113,10 +111,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash) ...@@ -113,10 +111,8 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
if (cmp > 0) if (cmp > 0)
return entry; return entry;
} }
if (entry->hash == -1 && freeslot == NULL) { if (entry->key == dummy && freeslot == NULL)
assert(entry->key == dummy);
freeslot = entry; freeslot = entry;
}
} }
perturb >>= PERTURB_SHIFT; perturb >>= PERTURB_SHIFT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment