diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-24 22:31:09 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2006-10-24 22:31:09 (GMT) |
commit | 8203d0d54fe955aafd4be1a45adb2bd87e80ae06 (patch) | |
tree | 33a2c02fa90731e646229afce792efce1b22d06b | |
parent | 7dbcf3186d085c65101f4b9c10cb8ba485258e2e (diff) | |
download | tcl-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]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclProc.c | 16 |
2 files changed, 14 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2006-10-24 Miguel Sofer <msofer@users.sf.net> + + * generic/tclProc.c (ObjInterpProcEx): disable itcl hacks for + calls from ApplyObjCmd (islambda==1), as they mess apply's error + messages [Bug 1583266] + 2006-10-23 Miguel Sofer <msofer@users.sf.net> * generic/tclProc.c (ApplyObjCmd): fix wrong#args for apply by 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; } |