Skip to content

Commit aab493a

Browse files
Do not update Py_Reftotal for Py_EMPTY_KEYS.
1 parent bdbce5f commit aab493a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/dictobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,10 +1542,10 @@ dictresize(PyInterpreterState *interp, PyDictObject *mp,
15421542

15431543
// We can not use free_keys_object here because key's reference
15441544
// are moved already.
1545+
if (oldkeys != Py_EMPTY_KEYS) {
15451546
#ifdef Py_REF_DEBUG
1546-
_Py_DecRefTotal(_PyInterpreterState_GET());
1547+
_Py_DecRefTotal(_PyInterpreterState_GET());
15471548
#endif
1548-
if (oldkeys != Py_EMPTY_KEYS) {
15491549
assert(oldkeys->dk_kind != DICT_KEYS_SPLIT);
15501550
assert(oldkeys->dk_refcnt == 1);
15511551
#if PyDict_MAXFREELIST > 0

0 commit comments

Comments
 (0)