diff options
Diffstat (limited to 'generic/tclBasic.c')
| -rw-r--r-- | generic/tclBasic.c | 18 | 
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;  | 
