diff options
author | dgp <dgp@users.sourceforge.net> | 2005-03-18 16:33:32 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-03-18 16:33:32 (GMT) |
commit | 38aa6b01bae64c7dfadc6191237627723343a0a3 (patch) | |
tree | 7baf6484b4775badabfc961d085c528deeecf945 /generic/tclCmdMZ.c | |
parent | 5a484df86936621e5bf60c2a78ab5832ed886485 (diff) | |
download | tcl-38aa6b01bae64c7dfadc6191237627723343a0a3.zip tcl-38aa6b01bae64c7dfadc6191237627723343a0a3.tar.gz tcl-38aa6b01bae64c7dfadc6191237627723343a0a3.tar.bz2 |
* generic/tclBasic.c (Tcl_EvalEx,TclEvalTokensStandard):
* generic/tclCmdMZ.c (Tcl_SubstObj):
* tests/basic.test (basic-46.4): Restored recursion limit
* tests/parse.test (parse-19.*): testing in nested command
substitutions within direct script evaluation (Tcl_EvalEx)
that got lost in the parser reforms of Tcl 8.1. Added tests for
correct behavior. [Bug 1115904]
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 0b71be6..ce28e54 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -14,12 +14,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.14 2005/03/10 20:22:42 dgp Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.15 2005/03/18 16:33:42 dgp Exp $ */ #include "tclInt.h" #include "tclPort.h" #include "tclRegexp.h" +#include "tclCompile.h" /* * Structure used to hold information about variable traces: @@ -2652,7 +2653,12 @@ Tcl_SubstObj(interp, objPtr, flags) Tcl_AppendToObj(resultObj, old, p-old); } iPtr->evalFlags = TCL_BRACKET_TERM; - code = Tcl_EvalEx(interp, p+1, -1, 0); + iPtr->numLevels++; + code = TclInterpReady(interp); + if (code == TCL_OK) { + code = Tcl_EvalEx(interp, p+1, -1, 0); + } + iPtr->numLevels--; switch (code) { case TCL_ERROR: goto errorResult; |