diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/object.c b/Objects/object.c index 8babf79..bcc129c 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1894,11 +1894,8 @@ PyMem_Malloc(size_t nbytes) void * PyMem_Realloc(void *p, size_t nbytes) { -#if _PyMem_EXTRA > 0 - if (nbytes == 0) - nbytes = _PyMem_EXTRA; -#endif - return PyMem_REALLOC(p, nbytes); + /* See comment near MALLOC_ZERO_RETURNS_NULL in pyport.h. */ + return PyMem_REALLOC(p, nbytes ? nbytes : 1); } void |