diff options
| author | dgp <dgp@users.sourceforge.net> | 2014-06-03 02:26:07 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2014-06-03 02:26:07 (GMT) |
| commit | 6c7e545b80e6ce72b0bf64749efedcd61153043a (patch) | |
| tree | 30271bb57cbf320e0346bfdfbe92e5edb9837c7a | |
| parent | 004361c91defcf9afeb7de00e9d4fcb6a043ae24 (diff) | |
| download | tcl-6c7e545b80e6ce72b0bf64749efedcd61153043a.zip tcl-6c7e545b80e6ce72b0bf64749efedcd61153043a.tar.gz tcl-6c7e545b80e6ce72b0bf64749efedcd61153043a.tar.bz2 | |
These edits make all tests outside of socket-14.* pass on OSX Mavericks.
Several socket-14.* tests failing there, and those that pass are very slow
about it. Firewall or poor networking configuration may be playing a role.
| -rw-r--r-- | generic/tclIO.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 5552329..998fe5e 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -3287,7 +3287,7 @@ Tcl_Close( stickyError = 0; - if ((statePtr->encoding != NULL) + if (GotFlag(statePtr, TCL_WRITABLE) && (statePtr->encoding != NULL) && !(statePtr->outputEncodingFlags & TCL_ENCODING_START)) { int code = CheckChannelErrors(statePtr, TCL_WRITABLE); @@ -3295,6 +3295,8 @@ Tcl_Close( if (code == 0) { statePtr->outputEncodingFlags |= TCL_ENCODING_END; code = WriteChars(chanPtr, "", 0); + statePtr->outputEncodingFlags &= ~TCL_ENCODING_END; + statePtr->outputEncodingFlags |= TCL_ENCODING_START; } if (code < 0) { stickyError = Tcl_GetErrno(); |
