diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-07-14 20:29:38 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-07-14 20:29:38 (GMT) |
commit | 8fde7ec910e486d89ba49167d1b295a34197064c (patch) | |
tree | e7f19f81beecf18df1b4ed7a51f18c483da17797 | |
parent | a3a847f6fe873e569cc78f12befd9d14ae73d114 (diff) | |
download | tcl-8fde7ec910e486d89ba49167d1b295a34197064c.zip tcl-8fde7ec910e486d89ba49167d1b295a34197064c.tar.gz tcl-8fde7ec910e486d89ba49167d1b295a34197064c.tar.bz2 |
* generic/tclParse.c: reverting the "fix" for [Bug 2017583],
* tests/parse.test: numLevel management and TclInterpReady check
seems to be necessary after all.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclParse.c | 13 | ||||
-rw-r--r-- | tests/parse.test | 6 |
3 files changed, 19 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2008-07-14 Miguel Sofer <msofer@users.sf.net> + + * generic/tclParse.c: reverting the "fix" for [Bug 2017583], + * tests/parse.test: numLevel management and TclInterpReady check + seems to be necessary after all. + 2008-07-14 Donal K. Fellows <dkf@users.sf.net> * generic/tclProc.c (TclNRApplyObjCmd, TclObjInterpProcCore): diff --git a/generic/tclParse.c b/generic/tclParse.c index 061f9eb..269978d 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclParse.c,v 1.69 2008/07/14 02:09:30 msofer Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.70 2008/07/14 20:29:40 msofer Exp $ */ #include "tclInt.h" @@ -2165,9 +2165,16 @@ TclSubstTokens( break; case TCL_TOKEN_COMMAND: { + Interp *iPtr = (Interp *) interp; + /* TIP #280: Transfer line information to nested command */ - code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, - 0, line); + iPtr->numLevels++; + code = TclInterpReady(interp); + if (code == TCL_OK) { + code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2, + 0, line); + } + iPtr->numLevels--; appendObj = Tcl_GetObjResult(interp); break; } diff --git a/tests/parse.test b/tests/parse.test index e1ab8c7..2220e22 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.33 2008/07/14 00:38:02 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.34 2008/07/14 20:29:41 msofer Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -1025,7 +1025,7 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp create i load {} Tcltest i i eval {proc {} args {}} - interp recursionlimit i 1 + interp recursionlimit i 2 } -body { i eval {testevalex {[[]]}} } -cleanup { @@ -1045,7 +1045,7 @@ test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { interp create i i eval {proc {} args {}} - interp recursionlimit i 1 + interp recursionlimit i 2 } -body { i eval {subst {[[]]}} } -cleanup { |