summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--generic/tclIORTrans.c7
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a59a01..85fcec9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;