summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-09-17 00:01:44 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-09-17 00:01:44 (GMT)
commitaeeead96a33d9d54f77f6beaa6e10b1bd2a8dd4f (patch)
treeb15861125f391af1b27fed45a53869e37d94b7c9 /generic
parent3b797b51b1cb45323e31deb42e2f9f95d0c877c0 (diff)
downloadtcl-aeeead96a33d9d54f77f6beaa6e10b1bd2a8dd4f.zip
tcl-aeeead96a33d9d54f77f6beaa6e10b1bd2a8dd4f.tar.gz
tcl-aeeead96a33d9d54f77f6beaa6e10b1bd2a8dd4f.tar.bz2
* generic/tclBasic.c: move TclResetCancellation to be called on
returning to level 0, as opposed to it being called on starting a command at level 0. Add a call on returning via Tcl_EvalObjEx to fix [Bug 2114165].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 1f80d43..42cac49 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.366 2008/09/10 13:24:00 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.367 2008/09/17 00:01:48 msofer Exp $
*/
#include "tclInt.h"
@@ -4033,7 +4033,6 @@ TclNREvalObjv(
TclNRAddCallback(interp, NRCommand, NULL, NULL, NULL, NULL);
cmdPtrPtr = (Command **) &(TOP_CB(interp)->data[0]);
- TclResetCancellation(interp, 0);
iPtr->numLevels++;
result = TclInterpReady(interp);
@@ -4411,6 +4410,14 @@ TEOV_Exception(
result = TCL_ERROR;
}
}
+
+ /*
+ * We are returning to level 0, so should process TclResetCancellation. As
+ * numLevels has not *yet* been decreased, do not call it: do the thing
+ * here directly.
+ */
+
+ iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND));
return result;
}
@@ -5924,6 +5931,13 @@ TEOEx_ByteCodeCallback(
script = Tcl_GetStringFromObj(objPtr, &numSrcBytes);
Tcl_LogCommandInfo(interp, script, script, numSrcBytes);
}
+
+ /*
+ * We are returning to level 0, so should call TclResetCancellation.
+ * Let us just unset the flags inline.
+ */
+
+ iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND));
}
iPtr->evalFlags = 0;