summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-03-19 16:59:06 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-03-19 16:59:06 (GMT)
commite5a9a4d6a85c0dcc262e00d46418410e63d63fa0 (patch)
treefa41016732a9e446bfb70eb52970688c69463f11
parentc29a0f17728ac66f5e659321fc15aa379af68abe (diff)
downloadtcl-e5a9a4d6a85c0dcc262e00d46418410e63d63fa0.zip
tcl-e5a9a4d6a85c0dcc262e00d46418410e63d63fa0.tar.gz
tcl-e5a9a4d6a85c0dcc262e00d46418410e63d63fa0.tar.bz2
* generic/tclBasic.c (Tcl_CreateMathFunc): Replaced some
* generic/tclEvent.c (Tcl_CreateThread): calls to Tcl_Alloc() * generic/tclObj.c (UpdateStringOfBignum): with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
-rw-r--r--ChangeLog8
-rw-r--r--generic/tclBasic.c5
-rw-r--r--generic/tclEvent.c6
-rw-r--r--generic/tclObj.c4
-rw-r--r--unix/tclUnixTime.c6
-rw-r--r--win/tclAppInit.c4
6 files changed, 20 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d4e1c4..382388d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-19 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced some
+ * generic/tclEvent.c (Tcl_CreateThread): calls to Tcl_Alloc()
+ * generic/tclObj.c (UpdateStringOfBignum): with calls to
+ * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better
+ * win/tclAppInit.c (setargv): supports memory debugging.
+
2007-03-19 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
* doc/regsub.n: Corrected example so that it doesn't recommend
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 2220b32..548bcc3 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.237 2007/02/27 20:34:37 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.238 2007/03/19 16:59:08 dgp Exp $
*/
#include "tclInt.h"
@@ -2985,8 +2985,7 @@ Tcl_CreateMathFunc(
data->proc = proc;
data->numArgs = numArgs;
- data->argTypes = (Tcl_ValueType*)
- Tcl_Alloc(numArgs * sizeof(Tcl_ValueType));
+ data->argTypes = (Tcl_ValueType*) ckalloc(numArgs * sizeof(Tcl_ValueType));
memcpy(data->argTypes, argTypes, numArgs * sizeof(Tcl_ValueType));
data->clientData = clientData;
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 2f03444..ff92252 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -12,7 +12,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.70 2007/03/12 19:28:49 dgp Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.71 2007/03/19 16:59:08 dgp Exp $
*/
#include "tclInt.h"
@@ -1290,7 +1290,7 @@ NewThreadProc(
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);
@@ -1329,7 +1329,7 @@ Tcl_CreateThread(
#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/tclObj.c b/generic/tclObj.c
index 719dfe4..b069896 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.117 2007/03/07 16:37:22 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.118 2007/03/19 16:59:08 dgp Exp $
*/
#include "tclInt.h"
@@ -2633,7 +2633,7 @@ UpdateStringOfBignum(
Tcl_Panic("UpdateStringOfBignum: string length limit exceeded");
}
- stringVal = Tcl_Alloc((size_t) size);
+ stringVal = ckalloc((size_t) size);
status = mp_toradix_n(&bignumVal, stringVal, 10, size);
if (status != MP_OKAY) {
Tcl_Panic("conversion failure in UpdateStringOfBignum");
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 09003a7..d73808d 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.27 2006/08/21 01:08:42 das Exp $
+ * RCS: @(#) $Id: tclUnixTime.c,v 1.28 2007/03/19 16:59:09 dgp Exp $
*/
#include "tclInt.h"
@@ -646,7 +646,7 @@ SetTZIfNecessary(void)
} else {
Tcl_Free(lastTZ);
}
- lastTZ = Tcl_Alloc(strlen(newTZ) + 1);
+ lastTZ = ckalloc(strlen(newTZ) + 1);
strcpy(lastTZ, newTZ);
}
Tcl_MutexUnlock(&tmMutex);
@@ -673,7 +673,7 @@ static void
CleanupMemory(
ClientData ignored)
{
- Tcl_Free(lastTZ);
+ ckfree(lastTZ);
}
/*
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 4156a74..65318b6 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.23 2006/01/05 04:50:24 davygrvy Exp $
+ * RCS: @(#) $Id: tclAppInit.c,v 1.24 2007/03/19 16:59:09 dgp Exp $
*/
#include "tcl.h"
@@ -245,7 +245,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 *);