Author ilblackdragon
Recipients Mark.Shannon, amaury.forgeotdarc, benjamin.peterson, brett.cannon, dmalcolm, ilblackdragon, jcea, larry, lemburg, mark.dickinson, vstinner
Date 2013-04-03.05:07:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Fixed Py_DECREF and Py_CLEAR as well. 

Added tests for Py_INCREF and Py_XINCREF (if somebody has a better idea how to tests that INCREF doesn't leak - please, let me know).

Removed comment that Py_DECREF evaluate it's argument multiple times as not relevant anymore.

About considerations from performance point of view - I've made toy example (only this defines and main function) to test how gcc optimizer behaves in different cases - from what I see, if expression is like this (which is majority of cases in the code):
 PyObject* obj = Foo();

assembly code that will be produced (with -O3) is the same before and after patch.
Date User Action Args
2013-04-03 05:07:35ilblackdragonsetrecipients: + ilblackdragon, lemburg, brett.cannon, jcea, amaury.forgeotdarc, mark.dickinson, vstinner, larry, benjamin.peterson, dmalcolm, Mark.Shannon
2013-04-03 05:07:35ilblackdragonsetmessageid: <>
2013-04-03 05:07:35ilblackdragonlinkissue17206 messages
2013-04-03 05:07:35ilblackdragoncreate