summaryrefslogtreecommitdiffstats
path: root/generic/tclInterp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r--generic/tclInterp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 1d28a95..a42c339 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInterp.c,v 1.76 2007/06/20 18:46:13 dgp Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.77 2007/09/06 18:13:20 dgp Exp $
*/
#include "tclInt.h"
@@ -3615,12 +3615,14 @@ TimeLimitCallback(
ClientData clientData)
{
Tcl_Interp *interp = (Tcl_Interp *) clientData;
+ int code;
Tcl_Preserve((ClientData) interp);
((Interp *)interp)->limit.timeEvent = NULL;
- if (Tcl_LimitCheck(interp) != TCL_OK) {
+ code = Tcl_LimitCheck(interp);
+ if (code != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (while waiting for event)");
- Tcl_BackgroundError(interp);
+ TclBackgroundException(interp, code);
}
Tcl_Release((ClientData) interp);
}
@@ -3788,7 +3790,7 @@ CallScriptLimitCallback(
code = Tcl_EvalObjEx(limitCBPtr->interp, limitCBPtr->scriptObj,
TCL_EVAL_GLOBAL);
if (code != TCL_OK && !Tcl_InterpDeleted(limitCBPtr->interp)) {
- Tcl_BackgroundError(limitCBPtr->interp);
+ TclBackgroundException(limitCBPtr->interp, code);
}
Tcl_Release(limitCBPtr->interp);
}