summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-19 17:06:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-19 17:06:24 (GMT)
commit85d645e7d34a62d8b3e0211277b9271fb32dce66 (patch)
treed4afeb9f0c63cd80b0121107034e2c1ec4220f98
parent81071e7c69ad7aef5a908c64b219977a52442ff5 (diff)
downloadtcl-85d645e7d34a62d8b3e0211277b9271fb32dce66.zip
tcl-85d645e7d34a62d8b3e0211277b9271fb32dce66.tar.gz
tcl-85d645e7d34a62d8b3e0211277b9271fb32dce66.tar.bz2
* generic/tclEvent.c (Tcl_CreateThread): Replaced some calls to
* generic/tclPkg.c (CheckVersion): Tcl_Alloc() with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclEvent.c6
-rw-r--r--generic/tclPkg.c6
-rw-r--r--unix/tclUnixTime.c6
-rw-r--r--win/tclAppInit.c4
5 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index d4ff293..e98e9b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-03-19 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclEvent.c (Tcl_CreateThread): Replaced some calls to
+ * generic/tclPkg.c (CheckVersion): Tcl_Alloc() with calls to
+ * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better
+ * win/tclAppInit.c (setargv): supports memory debugging.
+
2007-03-17 Kevin Kenny <kennykb@acm.org>
* win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 6456a40..2cdae51 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEvent.c,v 1.28.2.14 2006/03/10 14:04:57 vasiljevic Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.28.2.15 2007/03/19 17:06:25 dgp Exp $
*/
#include "tclInt.h"
@@ -1224,7 +1224,7 @@ NewThreadProc(ClientData clientData)
cdPtr = (ThreadClientData*)clientData;
threadProc = cdPtr->proc;
threadClientData = cdPtr->clientData;
- Tcl_Free((char*)clientData); /* Allocated in Tcl_CreateThread() */
+ ckfree((char*)clientData); /* Allocated in Tcl_CreateThread() */
(*threadProc)(threadClientData);
@@ -1262,7 +1262,7 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags)
#ifdef TCL_THREADS
ThreadClientData *cdPtr;
- cdPtr = (ThreadClientData*)Tcl_Alloc(sizeof(ThreadClientData));
+ cdPtr = (ThreadClientData*)ckalloc(sizeof(ThreadClientData));
cdPtr->proc = proc;
cdPtr->clientData = clientData;
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 5115442..df209ea 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkg.c,v 1.9.2.8 2006/12/05 17:44:44 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.9.2.9 2007/03/19 17:06:26 dgp Exp $
*
* TIP #268.
* Heavily rewritten to handle the extend version numbers, and extended
@@ -1762,7 +1762,7 @@ CheckVersionAndConvert(interp, string, internal, stable)
/* 4* assuming that each char is a separator (a,b become ' -x ').
* 4+ to have spce for an additional -2 at the end
*/
- char* ibuf = Tcl_Alloc (4+4*strlen(string));
+ char* ibuf = ckalloc (4+4*strlen(string));
char* ip = ibuf;
/* Basic rules
@@ -1834,7 +1834,7 @@ CheckVersionAndConvert(interp, string, internal, stable)
error:
#ifdef TCL_TIP268
- Tcl_Free (ibuf);
+ ckfree (ibuf);
#endif
Tcl_AppendResult(interp, "expected version number but got \"",
string, "\"", (char *) NULL);
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index da03440..b7ef888 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.4 2005/03/15 16:29:54 kennykb Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.15.2.5 2007/03/19 17:06:26 dgp Exp $
*/
#include "tclInt.h"
@@ -461,7 +461,7 @@ SetTZIfNecessary() {
} else {
Tcl_Free( lastTZ );
}
- lastTZ = Tcl_Alloc( strlen( newTZ ) + 1 );
+ lastTZ = ckalloc( strlen( newTZ ) + 1 );
strcpy( lastTZ, newTZ );
}
Tcl_MutexUnlock(&tmMutex);
@@ -488,5 +488,5 @@ SetTZIfNecessary() {
static void
CleanupMemory( ClientData ignored )
{
- Tcl_Free( lastTZ );
+ ckfree( lastTZ );
}
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index cc2c1de..ee8563b 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclAppInit.c,v 1.11.2.2 2003/10/14 22:41:42 davygrvy Exp $
+ * RCS: @(#) $Id: tclAppInit.c,v 1.11.2.3 2007/03/19 17:06:26 dgp Exp $
*/
#include "tcl.h"
@@ -315,7 +315,7 @@ setargv(argcPtr, argvPtr)
}
}
}
- argSpace = (char *) Tcl_Alloc(
+ argSpace = (char *) ckalloc(
(unsigned) (size * sizeof(char *) + strlen(cmdLine) + 1));
argv = (char **) argSpace;
argSpace += size * sizeof(char *);