summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 4468e41..7ee8415 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.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: tclProc.c,v 1.119 2007/06/14 17:09:14 hobbs Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.120 2007/06/14 17:29:09 msofer Exp $
*/
#include "tclInt.h"
@@ -1456,7 +1456,8 @@ TclObjInterpProcCore(
desiredObjs[0] = (isLambda ? framePtr->objv[skip-1] :
Tcl_NewListObj(skip, framePtr->objv));
#endif /* AVOID_HACKS_FOR_ITCL */
-
+ Tcl_IncrRefCount(desiredObjs[0]);
+
localPtr = procPtr->firstLocalPtr;
for (i=1 ; i<=numArgs ; i++) {
Tcl_Obj *argObj;
@@ -1479,14 +1480,8 @@ TclObjInterpProcCore(
Tcl_WrongNumArgs(interp, numArgs+1, desiredObjs, final);
result = TCL_ERROR;
-#ifndef AVOID_HACKS_FOR_ITCL
- if (!isLambda) {
- TclDecrRefCount(desiredObjs[0]);
- }
-#endif /* AVOID_HACKS_FOR_ITCL */
-
- for (i=1 ; i<=numArgs ; i++) {
- TclDecrRefCount(desiredObjs[i]);
+ for (i=0 ; i<=numArgs ; i++) {
+ Tcl_DecrRefCount(desiredObjs[i]);
}
TclStackFree(interp);
goto procDone;