summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclBasic.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f0ca176..511aef8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-07-30 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclBasic.c: guard against the value of iPtr->evalFlags
+ changing between the times where TEOV and TEOV_exception
+ run. Thanks dgp for catching this.
+
2008-07-29 Miguel Sofer <msofer@users.sf.net>
* tests/NRE.test: new tests that went MIA in the NRE revamping
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 0524d5b..7580316 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,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.335 2008/07/29 20:53:21 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.336 2008/07/30 17:30:56 msofer Exp $
*/
#include "tclInt.h"
@@ -4329,7 +4329,8 @@ TEOV_PushExceptionHandlers(
* No CONTINUE or BREAK at level 0, manage RETURN
*/
- TclNRAddCallback(interp, TEOV_Exception, NULL, NULL, NULL, NULL);
+ TclNRAddCallback(interp, TEOV_Exception, INT2PTR(iPtr->evalFlags),
+ NULL, NULL, NULL);
}
}
@@ -4366,7 +4367,7 @@ TEOV_Exception(
int result)
{
Interp *iPtr = (Interp *) interp;
- int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS);
+ int allowExceptions = PTR2INT(data[0]);
if (result != TCL_OK) {
if (result == TCL_RETURN) {