STINNER Victor added the comment:
> Modules/_json.c:1558: item = NULL;
> You can move it outside of the loop.
I prefer to set item to NULL just after PyList_SET_ITEM() to make it explicit
that the list now owns the reference.
> But may be it will be better to make this "item" variable local.
"item" is also used below, and I don't want to have two "item" variables.
I commited my to Python 3.4 & 3.5.
Python 2.7 doesn't look to be affected, chunk and item are not cleared
(Py_DECREF) in the error handler ("bail:" label).
Thanks for the review.
----------
resolution: -> fixed
status: open -> closed
versions: -Python 2.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com