summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-05-02 14:45:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-05-02 14:45:03 (GMT)
commitab2c4a52f1dbcc67939ad86233d21cf7fc38a5cd (patch)
treec071b838895bf7ed9dd0bf98df69b07f36c2231a
parent3452d681c93ec5cab5edc2d45bbd0d02f9beadb1 (diff)
downloadtcl-ab2c4a52f1dbcc67939ad86233d21cf7fc38a5cd.zip
tcl-ab2c4a52f1dbcc67939ad86233d21cf7fc38a5cd.tar.gz
tcl-ab2c4a52f1dbcc67939ad86233d21cf7fc38a5cd.tar.bz2
Add some comments about possible other self-restacking troubles.
-rw-r--r--generic/tclIO.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index adea32e..58c7b3c 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -1747,6 +1747,10 @@ Tcl_StackChannel(
statePtr->csPtrR = NULL;
statePtr->csPtrW = NULL;
+ /*
+ * TODO: Examine what can go wrong if Tcl_Flush() call disturbs
+ * the stacking state of this channel during its operations.
+ */
if (Tcl_Flush((Tcl_Channel) prevChanPtr) != TCL_OK) {
statePtr->csPtrR = csPtrR;
statePtr->csPtrW = csPtrW;
@@ -9786,12 +9790,15 @@ StackSetBlockMode(
{
int result = 0;
Tcl_DriverBlockModeProc *blockModeProc;
+ ChannelState *statePtr = chanPtr->state;
/*
* Start at the top of the channel stack
+ * TODO: Examine what can go wrong when blockModeProc calls
+ * disturb the stacking state of the channel.
*/
- chanPtr = chanPtr->state->topChanPtr;
+ chanPtr = statePtr->topChanPtr;
while (chanPtr != NULL) {
blockModeProc = Tcl_ChannelBlockModeProc(chanPtr->typePtr);
if (blockModeProc != NULL) {