Greg Ewing wrote:
> Edward C. Jones wrote:
>
>> Can Py_CLEAR completely replace Py_DECREF and Py_XDECREF?
>
> It would be less efficient in the cases where you don't
> need to check for NULL and/or clear the reference
> afterwards.
Both should be optimized away by the compiler.
But what we gain is one obvious way to do it, which would be more robust.
This sounds like somebody should simply try it out (but I'm not sure, if
blindly replacing Py_DECREF and Py_XDECREF with Py_CLEAR would be enough).
Servus,
Walter
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com