summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r--generic/tclInterp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index b8f1fe2..8159855 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.21 2003/03/12 17:52:36 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.22 2003/05/12 22:44:24 dgp Exp $
*/
#include "tclInt.h"
@@ -1446,7 +1446,7 @@ AliasObjCmd(clientData, interp, objc, objv)
#define ALIAS_CMDV_PREALLOC 10
Tcl_Interp *targetInterp;
Alias *aliasPtr;
- int result, prefc, cmdc;
+ int result, prefc, cmdc, i;
Tcl_Obj **prefv, **cmdv;
Tcl_Obj *cmdArr[ALIAS_CMDV_PREALLOC];
aliasPtr = (Alias *) clientData;
@@ -1474,6 +1474,9 @@ AliasObjCmd(clientData, interp, objc, objv)
Tcl_ResetResult(targetInterp);
+ for (i=0; i<cmdc; i++) {
+ Tcl_IncrRefCount(cmdv[i]);
+ }
if (targetInterp != interp) {
Tcl_Preserve((ClientData) targetInterp);
result = Tcl_EvalObjv(targetInterp, cmdc, cmdv, TCL_EVAL_INVOKE);
@@ -1482,6 +1485,9 @@ AliasObjCmd(clientData, interp, objc, objv)
} else {
result = Tcl_EvalObjv(targetInterp, cmdc, cmdv, TCL_EVAL_INVOKE);
}
+ for (i=0; i<cmdc; i++) {
+ Tcl_DecrRefCount(cmdv[i]);
+ }
if (cmdv != cmdArr) {
ckfree((char *) cmdv);