summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.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/tclIndexObj.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/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index df658dd..af0b444 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.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: tclIndexObj.c,v 1.31 2006/04/06 18:57:58 dgp Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.32 2007/04/02 18:48:03 dgp Exp $
*/
#include "tclInt.h"
@@ -525,12 +525,12 @@ Tcl_WrongNumArgs(
len = Tcl_ScanCountedElement(elementStr, elemLen, &flags);
if (MAY_QUOTE_WORD && len != elemLen) {
- char *quotedElementStr = ckalloc((unsigned) len);
+ char *quotedElementStr = TclStackAlloc(interp, (unsigned) len);
len = Tcl_ConvertCountedElement(elementStr, elemLen,
quotedElementStr, flags);
Tcl_AppendToObj(objPtr, quotedElementStr, len);
- ckfree(quotedElementStr);
+ TclStackFree(interp); /* quotedElementStr */
} else {
Tcl_AppendToObj(objPtr, elementStr, elemLen);
}
@@ -573,12 +573,12 @@ Tcl_WrongNumArgs(
len = Tcl_ScanCountedElement(elementStr, elemLen, &flags);
if (MAY_QUOTE_WORD && len != elemLen) {
- char *quotedElementStr = ckalloc((unsigned) len);
+ char *quotedElementStr = TclStackAlloc(interp,(unsigned) len);
len = Tcl_ConvertCountedElement(elementStr, elemLen,
quotedElementStr, flags);
Tcl_AppendToObj(objPtr, quotedElementStr, len);
- ckfree(quotedElementStr);
+ TclStackFree(interp); /* quotedElementStr */
} else {
Tcl_AppendToObj(objPtr, elementStr, elemLen);
}