[issue17206] Py_XDECREF() expands its argument multiple times

Jeremy Kloth report at bugs.python.org
Mon Jun 24 13:19:59 CEST 2013


Jeremy Kloth added the comment:

At least in a debug build, the MSVC 64-bit compiler seems to allocate space for each unique variable declared in the function body.  Therefore, by changing the temporary variables to be named identically, the amount of required space is minimized.

The refactoring of Py_DECREF is needed to prevent an error for local variable defined before use when Py_DECREF is nested within another macro already defining _py_tmp (it would expand to roughly PyObject *_py_tmp = _py_tmp).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17206>
_______________________________________


More information about the Python-bugs-list mailing list