[issue17206] Py_XDECREF() expands its argument multiple times

Amaury Forgeot d'Arc report at bugs.python.org
Tue Apr 9 08:42:04 CEST 2013


Amaury Forgeot d'Arc added the comment:

As I wrote in issue17589, there are some extension modules (pytables) that which assume that Py_INCREF is an expression:
  return Py_INCREF(x), x;
and Py_RETURN_NONE is also defined with a comma expression.

Oh, and Cython:
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))

----------

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


More information about the Python-bugs-list mailing list