diff options
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index e4ca35b..64d3f13 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,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.179 2010/03/05 14:34:04 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.180 2010/08/15 16:12:27 dkf Exp $ */ #include "tclInt.h" @@ -1106,13 +1106,15 @@ ProcWrongNumArgs( desiredObjs = TclStackAlloc(interp, (int) sizeof(Tcl_Obj *) * (numArgs+1)); + if (framePtr->isProcCallFrame & FRAME_IS_LAMBDA) { + desiredObjs[0] = Tcl_NewStringObj("lambdaExpr", -1); + } else { #ifdef AVOID_HACKS_FOR_ITCL - desiredObjs[0] = framePtr->objv[skip-1]; + desiredObjs[0] = framePtr->objv[skip-1]; #else - desiredObjs[0] = ((framePtr->isProcCallFrame & FRAME_IS_LAMBDA) - ? framePtr->objv[skip-1] - : Tcl_NewListObj(skip, framePtr->objv)); + desiredObjs[0] = Tcl_NewListObj(skip, framePtr->objv); #endif /* AVOID_HACKS_FOR_ITCL */ + } Tcl_IncrRefCount(desiredObjs[0]); defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt); @@ -1286,7 +1288,7 @@ InitResolvedLocals( codePtr->flags &= ~TCL_BYTECODE_RESOLVE_VARS; /* - * Initialize the array of local variables stored in the call frame. Some + * Initialize the array of local variables stored in the call frame. Some * variables may have special resolution rules. In that case, we call * their "resolver" procs to get our hands on the variable, and we make * the compiled local a link to the real variable. |