summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2006-10-24 22:31:09 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2006-10-24 22:31:09 (GMT)
commit8203d0d54fe955aafd4be1a45adb2bd87e80ae06 (patch)
tree33a2c02fa90731e646229afce792efce1b22d06b /generic/tclProc.c
parent7dbcf3186d085c65101f4b9c10cb8ba485258e2e (diff)
downloadtcl-8203d0d54fe955aafd4be1a45adb2bd87e80ae06.zip
tcl-8203d0d54fe955aafd4be1a45adb2bd87e80ae06.tar.gz
tcl-8203d0d54fe955aafd4be1a45adb2bd87e80ae06.tar.bz2
* generic/tclProc.c (ObjInterpProcEx): disable itcl hacks for
calls from ApplyObjCmd (islambda==1), as they mess apply's error messages [Bug 1583266]
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index b2ff2b9..cff6bef 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.98 2006/10/24 00:29:31 msofer Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.99 2006/10/24 22:31:09 msofer Exp $
*/
#include "tclInt.h"
@@ -1316,7 +1316,7 @@ ObjInterpProcEx(
#ifdef AVOID_HACKS_FOR_ITCL
desiredObjs[0] = objv[0];
#else
- desiredObjs[0] = Tcl_NewListObj(1, objv);
+ desiredObjs[0] = (isLambda? objv[0]: Tcl_NewListObj(1, objv));
#endif /* AVOID_HACKS_FOR_ITCL */
localPtr = procPtr->firstLocalPtr;
@@ -1337,15 +1337,15 @@ ObjInterpProcEx(
Tcl_WrongNumArgs(interp, numArgs+1, desiredObjs, NULL);
result = TCL_ERROR;
-#ifdef AVOID_HACKS_FOR_ITCL
- for (i=1 ; i<=numArgs ; i++) {
- TclDecrRefCount(desiredObjs[i]);
+#ifndef AVOID_HACKS_FOR_ITCL
+ if (!isLambda) {
+ TclDecrRefCount(desiredObjs[0]);
}
-#else
- for (i=0 ; i<=numArgs ; i++) {
+#endif /* AVOID_HACKS_FOR_ITCL */
+
+ for (i=1 ; i<=numArgs ; i++) {
TclDecrRefCount(desiredObjs[i]);
}
-#endif /* AVOID_HACKS_FOR_ITCL */
ckfree((char *) desiredObjs);
goto procDone;
}