Tcl Source Code

Artifact [5dc8849a2e]
Login

Artifact 5dc8849a2ec1a70291ab9df27b171f1a46c5c024:

Attachment "numlevels.patch" to ticket [2017583fff] added by msofer 2008-07-14 07:36:13.
Index: generic/tclParse.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclParse.c,v
retrieving revision 1.65
diff -u -r1.65 tclParse.c
--- generic/tclParse.c	13 Jun 2008 05:45:14 -0000	1.65
+++ generic/tclParse.c	14 Jul 2008 00:28:48 -0000
@@ -2167,9 +2167,6 @@
 	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 @@
 		code = TclEvalEx(interp, tokenPtr->start+1, tokenPtr->size-2,
 			0, line);
 	    }
-	    iPtr->numLevels--;
 	    appendObj = Tcl_GetObjResult(interp);
 	    break;
 	}
Index: tests/parse.test
===================================================================
RCS file: /cvsroot/tcl/tcl/tests/parse.test,v
retrieving revision 1.32
diff -u -r1.32 parse.test
--- tests/parse.test	13 Jul 2008 09:03:35 -0000	1.32
+++ tests/parse.test	14 Jul 2008 00:28:48 -0000
@@ -1025,7 +1025,7 @@
     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.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 {