summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 9074a76..f84c929 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -683,6 +683,7 @@ set_merge(PySetObject *so, PyObject *otherset)
{
PySetObject *other;
PyObject *key;
+ PyObject *dummy_entry;
Py_hash_t hash;
Py_ssize_t i;
setentry *entry;
@@ -702,12 +703,13 @@ set_merge(PySetObject *so, PyObject *otherset)
if (set_table_resize(so, (so->used + other->used)*2) != 0)
return -1;
}
+ dummy_entry = dummy;
for (i = 0; i <= other->mask; i++) {
entry = &other->table[i];
key = entry->key;
hash = entry->hash;
if (key != NULL &&
- key != dummy) {
+ key != dummy_entry) {
Py_INCREF(key);
if (set_insert_key(so, key, hash) == -1) {
Py_DECREF(key);