diff options
author | hobbs <hobbs> | 2008-01-20 21:16:14 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2008-01-20 21:16:14 (GMT) |
commit | 4c589fe59abd497046fce0ef8b7c86a244608fe2 (patch) | |
tree | 9b42084ec6864e73dc041eea804c59b34fec9077 | |
parent | 6ffdf3453e1742088513fa2f50f02707b6c20275 (diff) | |
download | tcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.zip tcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.tar.gz tcl-4c589fe59abd497046fce0ef8b7c86a244608fe2.tar.bz2 |
* generic/tclIO.c (TclGetsObjBinary): operate on topmost channel.
[Bug 1869405] (Ficicchia)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclIO.c | 20 |
2 files changed, 18 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2008-01-20 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclIO.c (TclGetsObjBinary): operate on topmost channel. + [Bug 1869405] (Ficicchia) + 2008-01-17 Don Porter <dgp@users.sourceforge.net> * generic/tclCompExpr.c: Revision to preserve parsed intreps 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; /* |