summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-04 04:44:32 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-04 04:44:32 (GMT)
commit84c1b974675b9252e1f5764a399ff9455fbf73e0 (patch)
tree2a44ade5afd5e8535d582fe750520272ed93706c /Objects/floatobject.c
parent243ea7166913a6cf9852373b2a3d965d6587477b (diff)
downloadcpython-84c1b974675b9252e1f5764a399ff9455fbf73e0.zip
cpython-84c1b974675b9252e1f5764a399ff9455fbf73e0.tar.gz
cpython-84c1b974675b9252e1f5764a399ff9455fbf73e0.tar.bz2
_PyMalloc_{Malloc, Realloc}: Strive to meet the doc's promises about
what these do given a 0 size argument. This is so that when pymalloc is enabled, we don't need to wrap pymalloc calls in goofy little routines special-casing 0. Note that it's virtually impossible to meet the doc's promise that malloc(0) will never return NULL; this makes a best effort, but not an insane effort. The code does promise that realloc(not-NULL, 0) will never return NULL (malloc(0) is much harder). _PyMalloc_Realloc: Changed to take over all requests for 0 bytes, and rearranged to be a little quicker in expected cases. All over the place: when resorting to the platform allocator, call free/malloc/realloc directly, without indirecting thru macros. This should avoid needing a nightmarish pile of #ifdef-ery if PYMALLOC_DEBUG is changed so that pymalloc takes over all Py(Mem, Object} memory operations (which would add useful debugging info to PyMem_xyz allocations too).
Diffstat (limited to 'Objects/floatobject.c')
0 files changed, 0 insertions, 0 deletions