Skip to content

Commit

Permalink
Do not update Py_Reftotal for Py_EMPTY_KEYS.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed May 9, 2023
1 parent bdbce5f commit aab493a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,10 +1542,10 @@ dictresize(PyInterpreterState *interp, PyDictObject *mp,

// We can not use free_keys_object here because key's reference
// are moved already.
if (oldkeys != Py_EMPTY_KEYS) {
#ifdef Py_REF_DEBUG
_Py_DecRefTotal(_PyInterpreterState_GET());
_Py_DecRefTotal(_PyInterpreterState_GET());
#endif
if (oldkeys != Py_EMPTY_KEYS) {
assert(oldkeys->dk_kind != DICT_KEYS_SPLIT);
assert(oldkeys->dk_refcnt == 1);
#if PyDict_MAXFREELIST > 0
Expand Down

0 comments on commit aab493a

Please sign in to comment.