diff options
author | andreas_kupries <akupries@shaw.ca> | 2009-09-01 17:31:53 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2009-09-01 17:31:53 (GMT) |
commit | e2f9593018e694ea4db44610c096ba4df5a3a3d3 (patch) | |
tree | 8f6a70bc1b10b0364c68addf1016a1a340384400 | |
parent | fba4c630a694890fb444eb5ca69f54ebc2bc4c13 (diff) | |
download | tcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.zip tcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.tar.gz tcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.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.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | generic/tclIORTrans.c | 7 |
2 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,12 @@ +2009-09-01 Andreas Kupries <andreask@activestate.com> + + * 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. + 2009-09-01 Don Porter <dgp@users.sourceforge.net> * library/tcltest/tcltest.tcl: Bump to tcltest 2.3.2 after revision 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; |