diff options
author | mig <mig> | 2013-01-02 19:27:09 (GMT) |
---|---|---|
committer | mig <mig> | 2013-01-02 19:27:09 (GMT) |
commit | 415a324f3cbb26121cb4836b48f68ba5b6b8cf56 (patch) | |
tree | 69a6d5ac720a80f7f581e2b8f9b39baa4a92d801 | |
parent | 8214e44b57a7ed7914a9d3eb4de78d298402edf0 (diff) | |
download | tcl-415a324f3cbb26121cb4836b48f68ba5b6b8cf56.zip tcl-415a324f3cbb26121cb4836b48f68ba5b6b8cf56.tar.gz tcl-415a324f3cbb26121cb4836b48f68ba5b6b8cf56.tar.bz2 |
remove stray calls to Tcl_Alloc and friends: the core should only use ckalloc to allow MEM_DEBUG to work properly
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | generic/tclExecute.c | 6 | ||||
-rw-r--r-- | generic/tclTomMathInterface.c | 6 |
3 files changed, 13 insertions, 6 deletions
@@ -1,3 +1,10 @@ +2013-01-02 Miguel Sofer <msofer@users.sf.net> + + * generic/tclEnsemble.c: Remove stray calls to Tcl_Alloc and + * generic/tclExecute.c: friends: the core should only use ckalloc + * generic/tclIORTrans.c: to allow MEM_DEBUG to work properly + * generic/tclTomMathInterface.c: + 2012-12-31 Donal K. Fellows <dkf@users.sf.net> * doc/string.n: Noted the obsolescence of the 'bytelength', diff --git a/generic/tclExecute.c b/generic/tclExecute.c index f2efa0f..229d7c6 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1063,7 +1063,7 @@ TclStackFree( Tcl_Obj **markerPtr; if (iPtr == NULL || iPtr->execEnvPtr == NULL) { - Tcl_Free((char *) freePtr); + ckfree((char *) freePtr); return; } @@ -1112,7 +1112,7 @@ TclStackAlloc( int numWords = (numBytes + (sizeof(Tcl_Obj *) - 1))/sizeof(Tcl_Obj *); if (iPtr == NULL || iPtr->execEnvPtr == NULL) { - return (void *) Tcl_Alloc(numBytes); + return (void *) ckalloc(numBytes); } return (void *) StackAllocWords(interp, numWords); @@ -1131,7 +1131,7 @@ TclStackRealloc( int numWords; if (iPtr == NULL || iPtr->execEnvPtr == NULL) { - return (void *) Tcl_Realloc((char *) ptr, numBytes); + return (void *) ckrealloc((char *) ptr, numBytes); } eePtr = iPtr->execEnvPtr; diff --git a/generic/tclTomMathInterface.c b/generic/tclTomMathInterface.c index 6e5dac3..89c1132 100644 --- a/generic/tclTomMathInterface.c +++ b/generic/tclTomMathInterface.c @@ -112,7 +112,7 @@ extern void * TclBNAlloc( size_t x) { - return (void *) Tcl_Alloc((unsigned int) x); + return (void *) ckalloc((unsigned int) x); } /* @@ -136,7 +136,7 @@ TclBNRealloc( void *p, size_t s) { - return (void *) Tcl_Realloc((char *) p, (unsigned int) s); + return (void *) ckrealloc((char *) p, (unsigned int) s); } /* @@ -162,7 +162,7 @@ extern void TclBNFree( void *p) { - Tcl_Free((char *) p); + ckfree((char *) p); } #endif |