summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2008-01-20 21:16:14 (GMT)
committerhobbs <hobbs>2008-01-20 21:16:14 (GMT)
commit4c589fe59abd497046fce0ef8b7c86a244608fe2 (patch)
tree9b42084ec6864e73dc041eea804c59b34fec9077 /generic
parent6ffdf3453e1742088513fa2f50f02707b6c20275 (diff)
downloadtcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.zip
tcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.tar.gz
tcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.tar.bz2
* generic/tclIO.c (TclGetsObjBinary): operate on topmost channel.
[Bug 1869405] (Ficicchia)
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index c9b179c..4caa474 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.136 2007/12/13 15:23:17 dgp Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.137 2008/01/20 21:16:15 hobbs Exp $
*/
#include "tclInt.h"
@@ -3953,12 +3953,6 @@ Tcl_GetsObj(
char *dst, *dstEnd, *eol, *eof;
Tcl_EncodingState oldState;
- /*
- * This operation should occur at the top of a channel stack.
- */
-
- chanPtr = statePtr->topChanPtr;
-
if (CheckChannelErrors(statePtr, TCL_READABLE) != 0) {
copiedTotal = -1;
goto done;
@@ -3976,6 +3970,12 @@ Tcl_GetsObj(
return TclGetsObjBinary(chan, objPtr);
}
+ /*
+ * This operation should occur at the top of a channel stack.
+ */
+
+ chanPtr = statePtr->topChanPtr;
+
bufPtr = statePtr->inQueueHead;
encoding = statePtr->encoding;
@@ -4316,6 +4316,12 @@ TclGetsObjBinary(
int rawLen, byteLen, eolChar;
unsigned char *dst, *dstEnd, *eol, *eof, *byteArray;
+ /*
+ * This operation should occur at the top of a channel stack.
+ */
+
+ chanPtr = statePtr->topChanPtr;
+
bufPtr = statePtr->inQueueHead;
/*