[issue20437] Use Py_CLEAR to safe clear attributes

2014-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Larry and Antoine for your reviews. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue20437] Use Py_CLEAR to safe clear attributes

2014-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b10943a5916 by Serhiy Storchaka in branch '2.7': Issue #20437: Fixed 43 potential bugs when deleting objects references. http://hg.python.org/cpython/rev/6b10943a5916 New changeset 6adac0d9b933 by Serhiy Storchaka in branch '3.3': Issue #20437: Fix

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nice work, LGTM! -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson, georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And here is a patch which replaces "Py_XDECREF(identifier); identifier = NULL;" to "Py_CLEAR(identifier);" (10 replaces in 7 files). It doesn't fix any bug (unless identifier is global variable), but makes a code a little cleaner. Compilers should generate e

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Larry Hastings
Larry Hastings added the comment: LGTM. If it compiles cleanly and passes the unit test suite--which obviously it should--you may check the 3.4 patch to trunk. -- nosy: +larry ___ Python tracker _

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patches are generated by following command: spatch --in-place --sp-file py_clear.spatch --dir . -- ___ Python tracker ___ ___

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +patch Added file: http://bugs.python.org/file33794/py_clear-3.4.patch ___ Python tracker ___ _

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file33795/py_clear-3.3.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file33796/py_clear-2.7.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue20437] Use Py_CLEAR to safe clear attributes

2014-01-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some time ago Victor proposed in issue16445 a large patch (275 changes) which replaces "Py_DECREF(expr); expr = NULL;" to safer "Py_CLEAR(expr);". That patch contained was so large because it included cases where expr is just a local variable, which are sa