This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients python-dev, serhiy.storchaka, vstinner
Date 2014-09-10.21:37:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1410385047.36.0.32864030754.issue22338@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-09-10 21:37:27vstinnersetrecipients: + vstinner, python-dev, serhiy.storchaka
2014-09-10 21:37:27vstinnersetmessageid: <1410385047.36.0.32864030754.issue22338@psf.upfronthosting.co.za>
2014-09-10 21:37:27vstinnerlinkissue22338 messages
2014-09-10 21:37:26vstinnercreate