diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c7c990d..021b937 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.78 2003/04/05 01:41:22 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.79 2003/04/25 21:23:18 dgp Exp $ */ #include "tclInt.h" @@ -3004,10 +3004,14 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) * word array with "unknown" as the first word and the original * command words as arguments. Then call ourselves recursively * to execute it. + * + * If caller requests, or if we're resolving the target end of + * an interpeter alias (TCL_EVAL_INVOKE), be sure to do command + * name resolution in the global namespace. */ savedVarFramePtr = iPtr->varFramePtr; - if (flags & TCL_EVAL_INVOKE) { + if (flags & (TCL_EVAL_INVOKE | TCL_EVAL_GLOBAL)) { iPtr->varFramePtr = NULL; } cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[0]); @@ -3515,8 +3519,8 @@ Tcl_EvalEx(interp, script, numBytes, flags) code = TCL_ERROR; } else { iPtr->numLevels++; - code = TclEvalObjvInternal(interp, objectsUsed, objv, p, - parse.commandStart + parse.commandSize - p, 0); + code = TclEvalObjvInternal(interp, objectsUsed, objv, + parse.commandStart, parse.commandSize, 0); iPtr->numLevels--; } if (code != TCL_OK) { |