[Patches] GC patch 3 and 4
Neil Schemenauer
nascheme@enme.ucalgary.ca
Thu, 29 Jun 2000 07:43:53 -0600
On Thu, Jun 29, 2000 at 09:38:01AM +0200, Vladimir Marangozov wrote:
> In objimpl.h, in the WITH_CYCLE_GC block, the above would look like
>
> #ifdef WITH_CYCLE_GC
> ...
> #undef PyObject_DEL
> #define PyObject_DEL(op) ( PyObject_IS_GC(op) ? \
> PyObject_FREE(PyObject_AS_GC(op)) : \
> PyObject_FREE(op) )
> ...
> #endif
I didn't do this originally for two reasons. First, that above
macro evaluates the op argument twice. In practice that should
not really be a problem. Secound, the PyObject_IS_GC test will
be done for all objects using PyObject_DEL which is a little more
expensive then things would have to be.
Neil