diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2008-09-04 16:34:47 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2008-09-04 16:34:47 (GMT) |
commit | dc278b028d2f80dcc48ee9cb4273d863d995bbae (patch) | |
tree | 513f93efb5fda3350047ea725e8400b357da4e6d | |
parent | e72b23c2ef58f8fc0fe5d9f1b6fd9dc04caedefa (diff) | |
download | tcl-dc278b028d2f80dcc48ee9cb4273d863d995bbae.zip tcl-dc278b028d2f80dcc48ee9cb4273d863d995bbae.tar.gz tcl-dc278b028d2f80dcc48ee9cb4273d863d995bbae.tar.bz2 |
* generic/tclExecute.c (CACHE_STACK_INFO):
* tests/unsupported.test: restore the execEnv's bottomPtr, fix
for [Bug 2093188].
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclExecute.c | 5 | ||||
-rw-r--r-- | tests/unsupported.test | 43 |
3 files changed, 51 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2008-09-04 Miguel Sofer <msofer@users.sf.net> + + * generic/tclExecute.c (CACHE_STACK_INFO): + * tests/unsupported.test: restore the execEnv's bottomPtr, fix + for [Bug 2093188]. + 2008-09-02 Don Porter <dgp@users.sourceforge.net> * generic/tcl.h: Stripped "callers" of the _ANSI_ARGS_ macro diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 453be92..308806c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.408 2008/08/23 01:48:26 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.409 2008/09/04 16:34:52 msofer Exp $ */ #include "tclInt.h" @@ -313,7 +313,8 @@ VarHashCreateVar( checkInterp = 1 #define DECACHE_STACK_INFO() \ - esPtr->tosPtr = tosPtr + esPtr->tosPtr = tosPtr; \ + iPtr->execEnvPtr->bottomPtr = bottomPtr /* * Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT diff --git a/tests/unsupported.test b/tests/unsupported.test index 37a9313..2c1a281 100644 --- a/tests/unsupported.test +++ b/tests/unsupported.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: unsupported.test,v 1.8 2008/09/01 12:28:10 msofer Exp $ +# RCS: @(#) $Id: unsupported.test,v 1.9 2008/09/04 16:34:55 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -769,6 +769,47 @@ test unsupported-C.3.4 {info coroutine} -constraints {coroutine} \ } -result ::foo +test unsupported-C.4.1 {bug #2093188} -constraints {coroutine} \ +-setup { + proc foo {} { + set v 1 + trace add variable v {write unset} bar + yield + set v 2 + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} write} {v {} write} {v {} unset}}} + +test unsupported-C.4.2 {bug #2093188} -constraints {coroutine} \ +-setup { + proc foo {} { + set v 1 + trace add variable v {read unset} bar + yield + set v 2 + set v + yield + set v 3 + } + proc bar args {lappend ::res $args} + coroutine a foo +} -body { + list [a] [a] $::res +} -cleanup { + rename foo {} + rename bar {} + unset ::res +} -result {{} 3 {{v {} read} {v {} unset}}} + # cleanup ::tcltest::cleanupTests |