summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclBasic.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index dd14c5e..8d7119e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-23 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclBasic.c (NRInterpCoroutine): store the caller's
+ eePtr, stop assuming the coroutine is invoked from the same
+ execEnv where it was created.
+
2008-08-24 Donal K. Fellows <dkf@users.sf.net>
* generic/tclCmdAH.c (TclNRForeachCmd): Converted the [foreach]
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 68b32bb..a710857 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.363 2008/08/24 14:38:08 dkf Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.364 2008/08/25 13:22:04 msofer Exp $
*/
#include "tclInt.h"
@@ -8260,7 +8260,6 @@ NRCoroutineExitCallback(
NRE_ASSERT(TOP_CB(interp) == NULL);
NRE_ASSERT(iPtr->execEnvPtr == corPtr->eePtr);
NRE_ASSERT(!COR_IS_SUSPENDED(corPtr));
- NRE_ASSERT(TOP_CB(interp) == NULL);
NRE_ASSERT((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineCallerCallback)
|| ((corPtr->callerEEPtr->callbackPtr->procPtr == NRCoroutineFirstCallback) &&
(corPtr->callerEEPtr->callbackPtr->nextPtr->procPtr == NRCoroutineCallerCallback)));
@@ -8326,6 +8325,7 @@ NRInterpCoroutine(
TclNRAddCallback(interp, NRCoroutineCallerCallback, corPtr, NULL, NULL,
NULL);
+ corPtr->callerEEPtr = iPtr->execEnvPtr;
iPtr->execEnvPtr = corPtr->eePtr;
return TclExecuteByteCode(interp, NULL);
}