diff options
author | dgp <dgp@users.sourceforge.net> | 2005-03-18 15:50:56 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-03-18 15:50:56 (GMT) |
commit | 1602b42886546fdee649c4be434cb8520e255248 (patch) | |
tree | 1b3e83defa340cf74ce336ffb668012adebdcc4c /generic/tclBasic.c | |
parent | f7bd42abc0c6952dae468911161f6dd0dc01f913 (diff) | |
download | tcl-1602b42886546fdee649c4be434cb8520e255248.zip tcl-1602b42886546fdee649c4be434cb8520e255248.tar.gz tcl-1602b42886546fdee649c4be434cb8520e255248.tar.bz2 |
* generic/tclBasic.c (Tcl_EvalEx): Restored recursion limit
* generic/tclParse.c (TclSubstTokens): testing in nested command
* tests/basic.test (basic-46.4): substitutions within direct
* tests/parse.test (parse-19.*): 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/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 086dfa9..1c497dc 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.141 2005/02/10 19:08:12 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.142 2005/03/18 15:50:59 dgp Exp $ */ #include "tclInt.h" @@ -3538,16 +3538,6 @@ Tcl_EvalEx(interp, script, numBytes, flags) parse.commandStart, parse.commandSize, 0); iPtr->numLevels--; if (code != TCL_OK) { - if (iPtr->numLevels == 0) { - if (code == TCL_RETURN) { - code = TclUpdateReturnInfo(iPtr); - } - if ((code != TCL_OK) && (code != TCL_ERROR) - && !allowExceptions) { - ProcessUnexpectedResult(interp, code); - code = TCL_ERROR; - } - } goto error; } for (i = 0; i < objectsUsed; i++) { @@ -3583,7 +3573,16 @@ Tcl_EvalEx(interp, script, numBytes, flags) error: /* Generate and log various pieces of error information. */ - + if (iPtr->numLevels == 0) { + if (code == TCL_RETURN) { + code = TclUpdateReturnInfo(iPtr); + } + if ((code != TCL_OK) && (code != TCL_ERROR) + && !allowExceptions) { + ProcessUnexpectedResult(interp, code); + code = TCL_ERROR; + } + } if ((code == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) { commandLength = parse.commandSize; if (parse.term == parse.commandStart + commandLength - 1) { |