[Python-3000] Use Py_CLEAR only
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Apr 19 14:01:25 CEST 2006
Walter Dörwald wrote:
> The "checking for NULL" scenario looks somewhat like this:
>
> And the "clearing the reference" scenario should look ike this:
But only if the reference is a local to the function,
and it's used in a disciplined enough way, and the
compiler is smart enough. None of those things are
guaranteed true for all uses of Py_DECREF/Py_XDECREF.
--
Greg
More information about the Python-3000
mailing list