]> granicus.if.org Git - python/commit
Whether platform malloc(0) returns NULL has nothing to do with whether
authorTim Peters <tim.peters@gmail.com>
Sat, 2 Mar 2002 08:43:19 +0000 (08:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 2 Mar 2002 08:43:19 +0000 (08:43 +0000)
commita5d78cc208c24be62b50b6d1540e03be6612d3f2
treeeda122d61fdabb1c1579ab4d8ff0898872a15f7c
parentb77d343bc846c2049a4cffb1dfd65eb49d1728b4
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
Objects/object.c