summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-07-23 17:10:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-07-23 17:10:26 (GMT)
commite2d932c2e380daab4ccf6f1a2fa6a0a43e66f425 (patch)
tree38635995f20c079af7ad74d8983d0f209aaffe00
parent421cb095720c641b6cef201242354a338207d3c3 (diff)
downloadtcl-e2d932c2e380daab4ccf6f1a2fa6a0a43e66f425.zip
tcl-e2d932c2e380daab4ccf6f1a2fa6a0a43e66f425.tar.gz
tcl-e2d932c2e380daab4ccf6f1a2fa6a0a43e66f425.tar.bz2
Extend the buffer move optimization to the "same encodings" case.
-rw-r--r--generic/tclIO.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 256b411..6718788 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -8840,8 +8840,9 @@ TclCopyChannel(
moveBytes = inStatePtr->inEofChar == '\0' /* No eofChar to stop input */
&& inStatePtr->inputTranslation == TCL_TRANSLATE_LF
&& outStatePtr->outputTranslation == TCL_TRANSLATE_LF
- && inStatePtr->encoding == NULL
- && outStatePtr->encoding == NULL
+ && ((inStatePtr->encoding == NULL
+ && outStatePtr->encoding == NULL)
+ || (inStatePtr->encoding == outStatePtr->encoding))
&& !nonBlocking; /* First draft do only blocking case */
/*