diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-08-15 16:16:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-08-15 16:16:07 (GMT) |
commit | a1ae335b924bca5292f4c4a0567695ef69544936 (patch) | |
tree | 196d241c2207595808473d1f941a5b8ea9fe56ce /generic/tclProc.c | |
parent | d56ade97df6d1d63f169102e4548dbc359e3b6eb (diff) | |
download | tcl-a1ae335b924bca5292f4c4a0567695ef69544936.zip tcl-a1ae335b924bca5292f4c4a0567695ef69544936.tar.gz tcl-a1ae335b924bca5292f4c4a0567695ef69544936.tar.bz2 |
* generic/tclProc.c (ProcWrongNumArgs): [Bug 3045010]: Make the
handling of passing the wrong number of arguments to [apply] somewhat
less verbose when a lambda term is present.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 3c8f810..0723a1e 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.139.2.6 2009/08/25 21:01:05 andreas_kupries Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.139.2.7 2010/08/15 16:16:07 dkf Exp $ */ #include "tclInt.h" @@ -1092,13 +1092,15 @@ ProcWrongNumArgs( desiredObjs = (Tcl_Obj **) 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); |