diff options
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 20 |
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; /* |