summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclProc.c15
2 files changed, 10 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d93ca0..b995476 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-14 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclProc.c (TclObjInterpProcCore): simplified obj
+ management in wrongNumArgs calls.
+
2007-06-14 Don Porter <dgp@users.sourceforge.net>
* generic/tclCompile.c: SetByteCodeFromAny() can no longer return
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;