summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-04-02 18:48:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-04-02 18:48:01 (GMT)
commitfa49c9af9b48554cf441f2554c9cd58d3ca1f267 (patch)
tree533f6091f7eb9bb16881b234e206e374e57eb34f /generic/tclInterp.c
parent662bbb37a4d2552ae0f59545f527731d80a47d3c (diff)
downloadtcl-fa49c9af9b48554cf441f2554c9cd58d3ca1f267.zip
tcl-fa49c9af9b48554cf441f2554c9cd58d3ca1f267.tar.gz
tcl-fa49c9af9b48554cf441f2554c9cd58d3ca1f267.tar.bz2
* generic/tclBasic.c: Replace arrays on the C stack and ckalloc
* generic/tclExecute.c: calls with TclStackAlloc calls to use memory * generic/tclFCmd.c: on Tcl's evaluation stack. * generic/tclFileName.c: * generic/tclIOCmd.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclTrace.c: * unix/tclUnixPipe.c:
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r--generic/tclInterp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 0bd79c4..6e9c041 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.70 2006/11/28 22:20:29 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.71 2007/04/02 18:48:03 dgp Exp $
*/
#include "tclInt.h"
@@ -1085,7 +1085,8 @@ Tcl_CreateAlias(
int i;
int result;
- objv = (Tcl_Obj **) ckalloc((unsigned) sizeof(Tcl_Obj *) * argc);
+ objv = (Tcl_Obj **)
+ TclStackAlloc(slaveInterp, (unsigned) sizeof(Tcl_Obj *) * argc);
for (i = 0; i < argc; i++) {
objv[i] = Tcl_NewStringObj(argv[i], -1);
Tcl_IncrRefCount(objv[i]);
@@ -1103,7 +1104,7 @@ Tcl_CreateAlias(
for (i = 0; i < argc; i++) {
Tcl_DecrRefCount(objv[i]);
}
- ckfree((char *) objv);
+ TclStackFree(slaveInterp); /* objv */
Tcl_DecrRefCount(targetObjPtr);
Tcl_DecrRefCount(slaveObjPtr);