diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2009-12-08 22:58:11 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2009-12-08 22:58:11 (GMT) |
commit | 241690109568a5350f8d8c672078b281fc19413b (patch) | |
tree | fbe46a4963e40cc06b66a8c9c84d52a911f17e1b | |
parent | 8c26b3a75b9dd2609485169cd288ca77926bd8d6 (diff) | |
download | tcl-241690109568a5350f8d8c672078b281fc19413b.zip tcl-241690109568a5350f8d8c672078b281fc19413b.tar.gz tcl-241690109568a5350f8d8c672078b281fc19413b.tar.bz2 |
minor cleanup
-rw-r--r-- | generic/tclBasic.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 072dfe3..5f30f0d 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.419 2009/12/08 21:44:56 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.420 2009/12/08 22:58:11 msofer Exp $ */ #include "tclInt.h" @@ -8665,7 +8665,6 @@ NRCoroutineExitCallback( TclDeleteExecEnv(corPtr->eePtr); corPtr->eePtr = NULL; - SAVE_CONTEXT(corPtr->running); RESTORE_CONTEXT(corPtr->caller); NRE_ASSERT(iPtr->framePtr == corPtr->caller.framePtr); @@ -8798,10 +8797,6 @@ TclNRCoroutineObjCmd( corPtr->stackLevel = NULL; corPtr->callerBP = NULL; - /* - * On first run just set a 0 level-offset, the natural numbering is - * correct. The offset will be fixed for later runs. - */ Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { @@ -8850,14 +8845,16 @@ TclNRCoroutineObjCmd( framePtr->objc = objc-2; framePtr->objv = &objv[2]; - SAVE_CONTEXT(corPtr->base); - corPtr->running = NULL_CONTEXT; - /* - * Signal TEBC that it has to initialize the base cmdFramePtr. + * Save the base context. The base cmdFramePtr is unknown at this time: it + * will be allocated in the Tcl stack. So signal TEBC that it has to + * initialize the base cmdFramePtr by setting it to NULL. */ + SAVE_CONTEXT(corPtr->base); corPtr->base.cmdFramePtr = NULL; + corPtr->running = NULL_CONTEXT; + /* * #280. |