PyMem_MALLOC (was [Python-Dev] Snake farm) (original) (raw)

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 PyMemMALLOC malloc to #define PyMemMALLOC(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