diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:30:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:30:41 (GMT) |
commit | 39e6f78e7e0d68f819a0b6ecb73e8f66a743b759 (patch) | |
tree | cf02db710ac9fbe3147594dce8f7371284f902e5 /generic | |
parent | c0edc29d67c0944180ce922c7f63d6dd3c3bdf6c (diff) | |
parent | c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5 (diff) | |
download | tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.zip tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.tar.gz tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.tar.bz2 |
[c31ca233ca] Fix TclGetsObjBinary() so that each [gets] rediscovers whether
a nonblocking channel is blocked.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index c8c9aec..5cdf2c3 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4799,11 +4799,6 @@ TclGetsObjBinary( * hasn't seen EOL. Need to read more bytes from the channel * device. Side effect is to allocate another channel buffer. */ - - if (GotFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_NONBLOCKING) - == (CHANNEL_BLOCKED|CHANNEL_NONBLOCKING)) { - goto restore; - } if (GetInput(chanPtr) != 0) { goto restore; } @@ -4870,6 +4865,10 @@ TclGetsObjBinary( } goto gotEOL; } + if (GotFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_NONBLOCKING) + == (CHANNEL_BLOCKED|CHANNEL_NONBLOCKING)) { + goto restore; + } /* * Copy bytes from the channel buffer to the ByteArray. |