diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2002-07-29 15:56:53 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2002-07-29 15:56:53 (GMT) |
commit | 75164b5a8a9172465a393abd3e3a6d9c7674e7d8 (patch) | |
tree | 3f080f45cb9304d12e125a5dcda51cac698ad730 /generic/tclBasic.c | |
parent | edeb2f602f676509e74e81b4d65bb966dc28e395 (diff) | |
download | tcl-75164b5a8a9172465a393abd3e3a6d9c7674e7d8.zip tcl-75164b5a8a9172465a393abd3e3a6d9c7674e7d8.tar.gz tcl-75164b5a8a9172465a393abd3e3a6d9c7674e7d8.tar.bz2 |
bugfix, new tests for new [interp alias] code
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index ef2a29c..e927654 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.66 2002/07/29 00:25:49 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.67 2002/07/29 15:56:53 msofer Exp $ */ #include "tclInt.h" @@ -2926,8 +2926,8 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) * used. */ int flags; /* Collection of OR-ed bits that control * the evaluation of the script. Only - * TCL_EVAL_GLOBAL is currently - * supported. */ + * TCL_EVAL_GLOBAL and TCL_EVAL_INVOKE are + * currently supported. */ { Command *cmdPtr; @@ -2957,8 +2957,14 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) * command words as arguments. Then call ourselves recursively * to execute it. */ - + + savedVarFramePtr = iPtr->varFramePtr; + if (flags & TCL_EVAL_INVOKE) { + iPtr->varFramePtr = NULL; + } cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[0]); + iPtr->varFramePtr = savedVarFramePtr; + if (cmdPtr == NULL) { newObjv = (Tcl_Obj **) ckalloc((unsigned) ((objc + 1) * sizeof (Tcl_Obj *))); @@ -3101,7 +3107,7 @@ Tcl_EvalObjv(interp, objc, objv, flags) * the words that make up the command. */ int flags; /* Collection of OR-ed bits that control * the evaluation of the script. Only - * TCL_EVAL_GLOBAL and TCL_EVAL_NO_TRACEBACK + * TCL_EVAL_GLOBAL and TCL_EVAL_INVOKE * are currently supported. */ { Interp *iPtr = (Interp *)interp; @@ -3158,7 +3164,7 @@ Tcl_EvalObjv(interp, objc, objv, flags) } } - if ((code == TCL_ERROR) && !(flags & TCL_EVAL_NO_TRACEBACK)) { + if ((code == TCL_ERROR) && !(flags & TCL_EVAL_INVOKE)) { /* * If there was an error, a command string will be needed for the |