]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
backport tim_one's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 14:24:45 +0000 (14:24 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 5 Mar 2002 14:24:45 +0000 (14:24 +0000)
commit7a4b55ddc09e1a1d3d5120413f8e17db460379bc
tree30d6f4aefe64b148f5392c887428e55f636d03f5
parentfc7af7705ca0b381a9abd0535d02bd44e3f07ced
backport tim_one's checkin of
    revision 2.5 of pymem.h
    revision 2.44 of pyport.h

Whether platform malloc(0) returns NULL has nothing to do with whether
platform realloc(p, 0) returns NULL, so MALLOC_ZERO_RETURNS_NULL can
be correctly undefined yet realloc(p, 0) can return NULL anyway.

Prevent realloc(p, 0) doing free(p) and returning NULL via a different
hack.  Would probably be better to get rid of MALLOC_ZERO_RETURNS_NULL
entirely.

Bugfix candidate.
Include/pymem.h
Include/pyport.h