Skip to content
Prev Previous commit
Next Next commit
Add a note.
  • Loading branch information
ericsnowcurrently committed May 8, 2023
commit f5da08808d8cc957989a9552ccdbf13897af9acc
8 changes: 6 additions & 2 deletions Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,12 @@ _PyDict_DebugMallocStats(FILE *out)

static void free_keys_object(PyInterpreterState *interp, PyDictKeysObject *keys);

// XXX Switch to Py_INCREF()?
/* We might consider modifying PyDictKeysObject so we could use
Py_INCREF() instead of dictkeys_incref() (and likewise with
Py_DECREF() and dictkeys_decref()). However, there doesn't
seem to be enough benefit (performance or otherwise) to justify
the change. */
Comment thread
sunmy2019 marked this conversation as resolved.
Outdated

static inline void
dictkeys_incref(PyDictKeysObject *dk)
{
Expand All @@ -313,7 +318,6 @@ dictkeys_incref(PyDictKeysObject *dk)
dk->dk_refcnt++;
}

// XXX Switch to Py_DECREF()?
static inline void
dictkeys_decref(PyInterpreterState *interp, PyDictKeysObject *dk)
{
Expand Down