diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 15:55:35 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-07 15:55:35 (GMT) |
| commit | 467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10 (patch) | |
| tree | 03949fda0c5247d6df80ba114da1ec1649060a89 /generic/tclAlloc.c | |
| parent | b8ffa18096ee9a37d5105ec6c48c0b6eeea7dbc4 (diff) | |
| download | tcl-467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10.zip tcl-467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10.tar.gz tcl-467d03dbc94f1e8b6ec74da6ac0f54ce4975bf10.tar.bz2 | |
Change (interal) function signature of TclpAlloc/TclpRealloc/TclpFree, using (void *) in stead of (char *)
Diffstat (limited to 'generic/tclAlloc.c')
| -rw-r--r-- | generic/tclAlloc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 0c0ab7b..c1e7b28 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -249,7 +249,7 @@ TclFinalizeAllocSubsystem(void) *---------------------------------------------------------------------- */ -char * +void * TclpAlloc( unsigned int numBytes) /* Number of bytes to allocate. */ { @@ -446,7 +446,7 @@ MoreCore( void TclpFree( - char *oldPtr) /* Pointer to memory to free. */ + void *oldPtr) /* Pointer to memory to free. */ { size_t size; union overhead *overPtr; @@ -509,9 +509,9 @@ TclpFree( *---------------------------------------------------------------------- */ -char * +void * TclpRealloc( - char *oldPtr, /* Pointer to alloced block. */ + void *oldPtr, /* Pointer to alloced block. */ unsigned int numBytes) /* New size of memory. */ { int i; @@ -581,7 +581,7 @@ TclpRealloc( #endif Tcl_MutexUnlock(allocMutexPtr); - return (char *)(overPtr+1); + return (void *)(overPtr+1); } maxSize = 1 << (i+3); expensive = 0; @@ -592,7 +592,7 @@ TclpRealloc( } if (expensive) { - char *newPtr; + void *newPtr; Tcl_MutexUnlock(allocMutexPtr); @@ -692,11 +692,11 @@ mstats( *---------------------------------------------------------------------- */ -char * +void * TclpAlloc( unsigned int numBytes) /* Number of bytes to allocate. */ { - return (char *) malloc(numBytes); + return malloc(numBytes); } /* @@ -717,7 +717,7 @@ TclpAlloc( void TclpFree( - char *oldPtr) /* Pointer to memory to free. */ + void *oldPtr) /* Pointer to memory to free. */ { free(oldPtr); return; @@ -739,12 +739,12 @@ TclpFree( *---------------------------------------------------------------------- */ -char * +void * TclpRealloc( - char *oldPtr, /* Pointer to alloced block. */ + void *oldPtr, /* Pointer to alloced block. */ unsigned int numBytes) /* New size of memory. */ { - return (char *) realloc(oldPtr, numBytes); + return realloc(oldPtr, numBytes); } #endif /* !USE_TCLALLOC */ |
