summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormig <mig>2012-10-18 17:38:19 (GMT)
committermig <mig>2012-10-18 17:38:19 (GMT)
commitd769538676cb8b26781e89f7ac1cb5dad28aa999 (patch)
tree4d14ef0085efe55df8224932282b1f1c6e5ce5c8
parent4bb1f92d128bf8ca978c59204d2636685d13e769 (diff)
downloadtcl-d769538676cb8b26781e89f7ac1cb5dad28aa999.zip
tcl-d769538676cb8b26781e89f7ac1cb5dad28aa999.tar.gz
tcl-d769538676cb8b26781e89f7ac1cb5dad28aa999.tar.bz2
* generic/tclBasic.c (TclNRCoroutineObjCmd): insure that numlevels
are properly set, fix bug discovered by dkf and reported at http://code.activestate.com/lists/tcl-core/12213/
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclBasic.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bafd366..edb7268 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-17 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclBasic.c (TclNRCoroutineObjCmd): insure that numlevels
+ are properly set, fix bug discovered by dkf and reported at
+ http://code.activestate.com/lists/tcl-core/12213/
+
2012-10-16 Donal K. Fellows <dkf@users.sf.net>
IMPLEMENTATION OF TIP#405
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 7c08f2f..3848d5b 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -9028,7 +9028,6 @@ TclNRCoroutineObjCmd(
corPtr->running.lineLABCPtr = corPtr->lineLABCPtr;
corPtr->stackLevel = NULL;
corPtr->auxNumLevels = 0;
- iPtr->numLevels--;
/*
* Create the coro's execEnv, switch to it to push the exit and coro
@@ -9047,16 +9046,17 @@ TclNRCoroutineObjCmd(
TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr,
NULL, NULL, NULL);
+ /* insure that the command is looked up in the correct namespace */
iPtr->lookupNsPtr = lookupNsPtr;
Tcl_NREvalObj(interp, Tcl_NewListObj(objc-2, objv+2), 0);
+ iPtr->numLevels--;
SAVE_CONTEXT(corPtr->running);
RESTORE_CONTEXT(corPtr->caller);
iPtr->execEnvPtr = corPtr->callerEEPtr;
/*
- * Now just resume the coroutine. Take care to insure that the command is
- * looked up in the correct namespace.
+ * Now just resume the coroutine.
*/
TclNRAddCallback(interp, NRCoroutineActivateCallback, corPtr,