mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
bpo-29476: Simplify set_add_entry() (#5175)
This commit is contained in:
parent
d37258dd2e
commit
3329992e31
1 changed files with 2 additions and 2 deletions
|
|
@ -187,7 +187,7 @@ set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
|
||||||
goto restart;
|
goto restart;
|
||||||
mask = so->mask; /* help avoid a register spill */
|
mask = so->mask; /* help avoid a register spill */
|
||||||
}
|
}
|
||||||
else if (entry->hash == -1 && freeslot == NULL)
|
else if (entry->hash == -1)
|
||||||
freeslot = entry;
|
freeslot = entry;
|
||||||
|
|
||||||
if (i + LINEAR_PROBES <= mask) {
|
if (i + LINEAR_PROBES <= mask) {
|
||||||
|
|
@ -216,7 +216,7 @@ set_add_entry(PySetObject *so, PyObject *key, Py_hash_t hash)
|
||||||
goto restart;
|
goto restart;
|
||||||
mask = so->mask;
|
mask = so->mask;
|
||||||
}
|
}
|
||||||
else if (entry->hash == -1 && freeslot == NULL)
|
else if (entry->hash == -1)
|
||||||
freeslot = entry;
|
freeslot = entry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue