diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:20:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:20:30 (GMT) |
commit | c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5 (patch) | |
tree | d0c8941599686cd2f946a53d19d3df8910fed610 /generic | |
parent | e7158f66d79b491e7b6f871259b591bd1aebe67d (diff) | |
download | tcl-c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5.zip tcl-c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5.tar.gz tcl-c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5.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 85b015c..9deec87 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4377,11 +4377,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; } @@ -4448,6 +4443,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. |