From 329d552a8ac8142022bae7a52391a5b4c7da811b Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 14 Jul 2008 00:38:00 +0000 Subject: * generic/tclParse.c: remove unnecessary numLevel management [Bug 2017583] --- ChangeLog | 3 +++ generic/tclParse.c | 6 +----- tests/parse.test | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d56cb8..25e1cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-14 Miguel Sofer + * generic/tclParse.c: remove unnecessary numLevel management + [Bug 2017583] + * generic/tclBasic.c.: NRE left too many calls to * generic/tclExecute.c: TclResetCancellation lying around: it * generic/tclProc.c: only needs to be called prior to any diff --git a/generic/tclParse.c b/generic/tclParse.c index 126ea4f..3548ade 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.65 2008/06/13 05:45:14 mistachkin Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.66 2008/07/14 00:38:02 msofer Exp $ */ #include "tclInt.h" @@ -2167,9 +2167,6 @@ TclSubstTokens( case TCL_TOKEN_COMMAND: { Interp *iPtr = (Interp *) interp; - TclResetCancellation(interp, 0); - - iPtr->numLevels++; code = TclInterpReady(interp); if (code == TCL_OK) { code = Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG); @@ -2179,7 +2176,6 @@ TclSubstTokens( 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 edf37d6..e1ab8c7 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.32 2008/07/13 09:03:35 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.33 2008/07/14 00:38:02 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 2 + interp recursionlimit i 1 } -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 2 + interp recursionlimit i 1 } -body { i eval {subst {[[]]}} } -cleanup { -- cgit v0.12