diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-14 17:29:08 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-14 17:29:08 (GMT) |
commit | f2024f79b6706bbd501492326da4833fe642d27f (patch) | |
tree | a6359a3054fc382be74a2eecf3cb24bca2ad9f8d /generic/tclProc.c | |
parent | 8a68f98d38f0ab0c1dca80d0ac18551302c0a12a (diff) | |
download | tcl-f2024f79b6706bbd501492326da4833fe642d27f.zip tcl-f2024f79b6706bbd501492326da4833fe642d27f.tar.gz tcl-f2024f79b6706bbd501492326da4833fe642d27f.tar.bz2 |
* generic/tclProc.c (TclObjInterpProcCore): simplified obj
management in wrongNumArgs calls.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 15 |
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; |