Skip to content

Commit 48a2b01

Browse files
committed
Remove redundant incref of immortal object Py_EMPTY_KEYS
1 parent 5ea9010 commit 48a2b01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4853,7 +4853,7 @@ dict_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
48534853

48544854
d->ma_used = 0;
48554855
d->_ma_watcher_tag = 0;
4856-
dictkeys_incref(Py_EMPTY_KEYS);
4856+
// We don't inc ref empty keys because they're immortal
48574857
d->ma_keys = Py_EMPTY_KEYS;
48584858
d->ma_values = NULL;
48594859
ASSERT_CONSISTENT(d);

0 commit comments

Comments
 (0)