From 21df44bb890a735b7857e4d9cf83e772055faaea Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 31 May 2014 14:12:50 +0000 Subject: Backout checkin 84f992ce50. This fixes test socket-14.11.1 and creates failure in tests *io-1.9. Branch bug-734138ded8 to work out resolution. --- generic/tclIO.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/generic/tclIO.c b/generic/tclIO.c index 7d94037..0ed6018 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -3287,8 +3287,7 @@ Tcl_Close( stickyError = 0; - if ((statePtr->encoding != NULL) - && !(statePtr->outputEncodingFlags & TCL_ENCODING_START) + if ((statePtr->encoding != NULL) && (statePtr->curOutPtr != NULL) && (CheckChannelErrors(statePtr, TCL_WRITABLE) == 0)) { statePtr->outputEncodingFlags |= TCL_ENCODING_END; if (WriteChars(chanPtr, "", 0) < 0) { @@ -7709,8 +7708,7 @@ Tcl_SetChannelOption( * iso2022, the terminated escape sequence must write to the buffer. */ - if ((statePtr->encoding != NULL) - && !(statePtr->outputEncodingFlags & TCL_ENCODING_START) + if ((statePtr->encoding != NULL) && (statePtr->curOutPtr != NULL) && (CheckChannelErrors(statePtr, TCL_WRITABLE) == 0)) { statePtr->outputEncodingFlags |= TCL_ENCODING_END; WriteChars(chanPtr, "", 0); -- cgit v0.12