PyMem_MALLOC (was [Python-Dev] Snake farm)

Martin v. Loewis martin@v.loewis.de
22 Nov 2002 19:23:39 +0100


Marc Recht <marc@informatik.uni-bremen.de> writes:

> What about changing
> PyMem_MALLOC malloc
> to
> #define PyMem_MALLOC(n)     n ? malloc(n) : NULL

No. Python requires that PyMem_MALLOC(0) returns a valid memory pointer
(although I'm not certain where exactly it requires that).

Regards,
Martin