Skip to content

Commit a6734fe

Browse files
committed
Remove outdated comment about Py_INCREF in JSON encoder
1 parent 948ef90 commit a6734fe

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Modules/_json.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,8 +1734,6 @@ _encoder_iterate_mapping_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
17341734
for (Py_ssize_t i = 0; i < PyList_GET_SIZE(items); i++) {
17351735
PyObject *item = PyList_GET_ITEM(items, i);
17361736

1737-
// GH-142831: The item must be strong-referenced to avoid
1738-
// use-after-free if the user code modifies the list during iteration.
17391737
Py_INCREF(item);
17401738

17411739
if (!PyTuple_Check(item) || PyTuple_GET_SIZE(item) != 2) {

0 commit comments

Comments
 (0)