Skip to content

Commit a731dce

Browse files
fix merge
1 parent aadb482 commit a731dce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Objects/dictobject.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,7 @@ unicodekeys_lookup_unicode_threadsafe_stackref(PyDictKeysObject* dk, PyObject *k
15871587
assert(PyUnicode_CheckExact(key));
15881588
assert(dk->dk_kind == DICT_KEYS_UNICODE);
15891589
Py_ssize_t ix = unicodekeys_lookup_unicode_threadsafe(dk, key, hash);
1590-
if (ix == DKIX_EMPTY) {
1591-
*value_addr = PyStackRef_NULL;
1592-
return DKIX_EMPTY;
1593-
} else if (ix >= 0) {
1590+
if (ix >= 0) {
15941591
PyObject **addr_of_value = &DK_UNICODE_ENTRIES(dk)[ix].me_value;
15951592
PyObject *value = _Py_atomic_load_ptr(addr_of_value);
15961593
if (value == NULL) {
@@ -1606,6 +1603,8 @@ unicodekeys_lookup_unicode_threadsafe_stackref(PyDictKeysObject* dk, PyObject *k
16061603
return ix;
16071604
}
16081605
}
1606+
*value_addr = PyStackRef_NULL;
1607+
return ix;
16091608
}
16101609

16111610

0 commit comments

Comments
 (0)