summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-08-21 21:01:17 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-08-21 21:01:17 (GMT)
commitd9990b25f1fc6db099c55ae7ce637230bc41d02c (patch)
tree2b215719a85e8c5af53cf2ee862bff6fdbf60993 /generic/tclCmdIL.c
parent0aefd12ecc49b90bb53275239ab60e815c7e2ad5 (diff)
downloadtcl-d9990b25f1fc6db099c55ae7ce637230bc41d02c.zip
tcl-d9990b25f1fc6db099c55ae7ce637230bc41d02c.tar.gz
tcl-d9990b25f1fc6db099c55ae7ce637230bc41d02c.tar.bz2
* generic/tclBasic.c: Fix the cmdFrame level count in
* generic/tclCmdIL.c: coroutines. Fix small bug on coroutine * generic/tclInt.h: rewind.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index fb8d54e..7e4973b 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.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: tclCmdIL.c,v 1.148 2008/08/14 02:09:46 das Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.149 2008/08/21 21:01:25 msofer Exp $
*/
#include "tclInt.h"
@@ -1045,7 +1045,17 @@ InfoFrameCmd(
Interp *iPtr = (Interp *) interp;
int level;
CmdFrame *framePtr;
+ int absoluteLevel = iPtr->cmdFramePtr->level;
+ if (iPtr->execEnvPtr->corPtr) {
+ /*
+ * We are running within a coroutine, the levels are relative to the
+ * coroutine's initial frame: do the correction here.
+ */
+
+ absoluteLevel += iPtr->execEnvPtr->corPtr->levelOffset;
+ }
+
if (objc == 1) {
/*
* Just "info frame".