[Python-Dev] Malloc interface (was: [Patches] Re: Garbage collection patches for Python (fwd)

Fredrik Lundh fredrik@pythonware.com
Mon, 14 Feb 2000 12:37:10 +0100


Vladimir Marangozov wrote:
> PyMem_XDEL is very rare in the distribution...

"if (p) free(p)" is quite common, though.

> Okay, so you can use PyMem_DEL directly.

which means that PyMem_DEL works just
fine for NULL pointers on almost all plat-
forms, while PyMem_XDEL works on all
platforms, but is slower if the pointer is
usually not NULL.

seems a bit messy to me...

> If your point is to remove it, or to rename it to PyMem_DEL in
> the distribution

my proposal is to have only one of these,
and force people on non-ANSI platforms
to provide a workaround.

</F>