Skip to content

Commit 878a3ed

Browse files
committed
Remove redundant comments per review
1 parent cfee66f commit 878a3ed

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

Modules/_json.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,8 +1767,6 @@ _encoder_iterate_dict_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
17671767
PyObject *key, *value;
17681768
Py_ssize_t pos = 0;
17691769
while (PyDict_Next(dct, &pos, &key, &value)) {
1770-
// GH-142831: The key and value must be strong-referenced to avoid
1771-
// use-after-free if the user code modifies the dict during iteration.
17721770
Py_INCREF(key);
17731771
Py_INCREF(value);
17741772

@@ -1885,8 +1883,6 @@ _encoder_iterate_fast_seq_lock_held(PyEncoderObject *s, PyUnicodeWriter *writer,
18851883
for (Py_ssize_t i = 0; i < PySequence_Fast_GET_SIZE(s_fast); i++) {
18861884
PyObject *obj = PySequence_Fast_GET_ITEM(s_fast, i);
18871885

1888-
// GH-142831: The object must be strong-referenced to avoid use-after-free
1889-
// if the user code modifies the sequence during iteration.
18901886
Py_INCREF(obj);
18911887

18921888
if (i) {

0 commit comments

Comments
 (0)