diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-12-27 21:41:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-12-27 21:41:31 (GMT) |
commit | 3408294224c7b4208ce601753a2180879b41e6ca (patch) | |
tree | cc71e1397a3d85fca94ad224345cae995c06ec01 /generic/tclAlloc.c | |
parent | 9694587a1a9ae9931bbef3181d46c69e75e42c8e (diff) | |
parent | 63224df965c165226da5226eba2d0036d0b6d2b3 (diff) | |
download | tcl-3408294224c7b4208ce601753a2180879b41e6ca.zip tcl-3408294224c7b4208ce601753a2180879b41e6ca.tar.gz tcl-3408294224c7b4208ce601753a2180879b41e6ca.tar.bz2 |
Merge trunk.
Rename Tcl_MemAlloc and friends back to Tcl_Alloc, as this renaming turns out not to be necessary.
Make everything compile/run with TCL_MEM_DEBUG=1 (a few signatures were still not correct)
Diffstat (limited to 'generic/tclAlloc.c')
-rw-r--r-- | generic/tclAlloc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 63b1ac5..c3966c4 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -692,11 +692,12 @@ mstats( *---------------------------------------------------------------------- */ -char * +#undef TclpAlloc +void * TclpAlloc( - unsigned int numBytes) /* Number of bytes to allocate. */ + size_t numBytes) /* Number of bytes to allocate. */ { - return (char *) malloc(numBytes); + return malloc(numBytes); } /* @@ -715,9 +716,10 @@ TclpAlloc( *---------------------------------------------------------------------- */ +#undef TclpFree void TclpFree( - char *oldPtr) /* Pointer to memory to free. */ + void *oldPtr) /* Pointer to memory to free. */ { free(oldPtr); return; @@ -739,12 +741,12 @@ TclpFree( *---------------------------------------------------------------------- */ -char * +void * TclpRealloc( - char *oldPtr, /* Pointer to alloced block. */ - unsigned int numBytes) /* New size of memory. */ + void *oldPtr, /* Pointer to alloced block. */ + size_t numBytes) /* New size of memory. */ { - return (char *) realloc(oldPtr, numBytes); + return realloc(oldPtr, numBytes); } #endif /* !USE_TCLALLOC */ |