diff options
Diffstat (limited to 'generic/tclBasic.c')
-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 cf9df21..6605ed7 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.75 2003/02/18 02:37:52 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.75.2.1 2003/04/25 21:21:25 dgp Exp $ */ #include "tclInt.h" @@ -3003,10 +3003,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]); @@ -3667,8 +3671,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) { |