diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2009-09-01 17:31:53 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2009-09-01 17:31:53 (GMT) |
commit | 9ca90d821580bb5477b2f2393fd098b968a08fe7 (patch) | |
tree | 8f6a70bc1b10b0364c68addf1016a1a340384400 /generic/tclIORTrans.c | |
parent | 752356616b221241055fd5ffdc599968c0f7118d (diff) | |
download | tcl-9ca90d821580bb5477b2f2393fd098b968a08fe7.zip tcl-9ca90d821580bb5477b2f2393fd098b968a08fe7.tar.gz tcl-9ca90d821580bb5477b2f2393fd098b968a08fe7.tar.bz2 |
* generic/tclIORTrans.c (ReflectInput): Remove error response to
0-result from method 'limit?' of transformations. Return the
number of copied bytes instead, which is possibly nothing. The
latter then triggers EOF handling in the higher layers, making the
0-result of limit? the way to inject artificial EOF's into the
data stream.
FossilOrigin-Name: 1e180c2bd11ce189488c9ba42cabd55f6098706b
Diffstat (limited to 'generic/tclIORTrans.c')
-rw-r--r-- | generic/tclIORTrans.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c index 2cf38b1..cb91829 100644 --- a/generic/tclIORTrans.c +++ b/generic/tclIORTrans.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIORTrans.c,v 1.8 2009/01/22 00:11:24 andreas_kupries Exp $ + * RCS: @(#) $Id: tclIORTrans.c,v 1.9 2009/09/01 17:31:53 andreas_kupries Exp $ */ #include <tclInt.h> @@ -424,8 +424,6 @@ static void DeleteReflectedTransformMap(ClientData clientData, * list-quoting to keep the words of the message together. See also [x]. */ -static const char *msg_read_badlimit = - "{Tcl driver returned bad read limit '0'}"; static const char *msg_read_unsup = "{read not supported by Tcl driver}"; static const char *msg_write_unsup = "{write not supported by Tcl driver}"; #ifdef TCL_THREADS @@ -1112,8 +1110,7 @@ ReflectInput( return -1; } if (maxRead == 0) { - SetChannelErrorStr(rtPtr->chan, msg_read_badlimit); - return -1; + return gotBytes; } else if (maxRead > 0) { if (maxRead < toRead) { toRead = maxRead; |