summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-02-28 15:47:10 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-02-28 15:47:10 (GMT)
commitee4fdde97a86a54e979eba422b462f0c45ae9121 (patch)
tree60936ebfe7abee67de474ed25fe62f127d92aee8 /generic/tclBasic.c
parent79c06cebc59a8bb6423c763367e84015e5fb0322 (diff)
downloadtcl-ee4fdde97a86a54e979eba422b462f0c45ae9121.zip
tcl-ee4fdde97a86a54e979eba422b462f0c45ae9121.tar.gz
tcl-ee4fdde97a86a54e979eba422b462f0c45ae9121.tar.bz2
* generic/tclBasic.c: Corrections to be sure that TCL_EVAL_GLOBAL
* tests/namespace.test: evaluations act the same as [uplevel #0] * tests/parse.test: evaluations, even when execution traces or * tests/trace.test: invocations of [::unknown] are present. [Bug 1439836].
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 7744858..dcfedc4 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.191 2006/02/22 17:42:04 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.192 2006/02/28 15:47:10 dgp Exp $
*/
#include "tclInt.h"
@@ -3348,6 +3348,9 @@ TclEvalObjvInternal(
* while loop one more time.
*/
+ if (flags & TCL_EVAL_GLOBAL) {
+ iPtr->varFramePtr = NULL;
+ }
if (iPtr->tracePtr != NULL && traceCode == TCL_OK) {
traceCode = TclCheckInterpTraces(interp, command, length,
cmdPtr, code, TCL_TRACE_ENTER_EXEC, objc, objv);
@@ -3356,6 +3359,7 @@ TclEvalObjvInternal(
traceCode = TclCheckExecutionTraces(interp, command, length,
cmdPtr, code, TCL_TRACE_ENTER_EXEC, objc, objv);
}
+ iPtr->varFramePtr = savedVarFramePtr;
cmdPtr->refCount--;
}
if (cmdEpoch != cmdPtr->cmdEpoch) {
@@ -3400,6 +3404,9 @@ TclEvalObjvInternal(
*/
if (!(cmdPtr->flags & CMD_IS_DELETED)) {
+ if (flags & TCL_EVAL_GLOBAL) {
+ iPtr->varFramePtr = NULL;
+ }
if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && (traceCode == TCL_OK)) {
traceCode = TclCheckExecutionTraces(interp, command, length,
cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv);
@@ -3408,6 +3415,7 @@ TclEvalObjvInternal(
traceCode = TclCheckInterpTraces(interp, command, length,
cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv);
}
+ iPtr->varFramePtr = savedVarFramePtr;
}
TclCleanupCommand(cmdPtr);