[issue17589] Make documentation about macros in C API explicit about rvalue vs statement
Larry Hastings
report at bugs.python.org
Tue Apr 9 04:15:15 CEST 2013
Larry Hastings added the comment:
Oh, and, yes, it's true that Py_RETURN_NONE currently takes advantage of Py_INCREF being an rvalue, and changing Py_INCREF to a statement would break the existing implementation. But Py_RETURN_NONE itself is of necessity a statement. We would simply change Py_RETURN_NONE's implementation to multiple statements, probably with the do { ... } while(0) trick, so it worked again. I'd be shocked if that change broke any existing code. So that's no big deal.
Having external code that depends on Py_INCREF being an rvalue is my concern, and what I hoped you'd bring up on bug #17206.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17589>
_______________________________________
More information about the Python-bugs-list
mailing list