8000 Add a note. · python/cpython@f5da088 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5da088

Browse files
Add a note.
1 parent 87351e0 commit f5da088

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Objects/dictobject.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,12 @@ _PyDict_DebugMallocStats(FILE *out)
300300

301301
static void free_keys_object(PyInterpreterState *interp, PyD 8000 ictKeysObject *keys);
302302

303-
// XXX Switch to Py_INCREF()?
303+
/* We might consider modifying PyDictKeysObject so we could use
304+
Py_INCREF() instead of dictkeys_incref() (and likewise with
305+
Py_DECREF() and dictkeys_decref()). However, there doesn't
306+
seem to be enough benefit (performance or otherwise) to justify
307+
the change. */
308+
304309
static inline void
305310
dictkeys_incref(PyDictKeysObject *dk)
306311
{
@@ -313,7 +318,6 @@ dictkeys_incref(PyDictKeysObject *dk)
313318
dk->dk_refcnt++;
314319
}
315320

316-
// XXX Switch to Py_DECREF()?
317321
static inline void
318322
dictkeys_decref(PyInterpreterState *interp, PyDictKeysObject *dk)
319323
{

0 commit comments

Comments
 (0)
0