summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-31 19:24:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-31 19:24:35 (GMT)
commitfc78297f13c393edaa5b39e0fa3c1af3e26b0cfc (patch)
treeea38df857c83022aa89b18bb8fb9c392ccab900e /generic/tclIO.c
parentcc936d0713b9e1b725a3296ecf05ab40139290e6 (diff)
downloadtcl-fc78297f13c393edaa5b39e0fa3c1af3e26b0cfc.zip
tcl-fc78297f13c393edaa5b39e0fa3c1af3e26b0cfc.tar.gz
tcl-fc78297f13c393edaa5b39e0fa3c1af3e26b0cfc.tar.bz2
Backport CHANNEL_PROFILE_GET() usage fix from 9.0
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index db66b7a..d4e562c 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -9461,17 +9461,12 @@ TclCopyChannel(
* of the bytes themselves.
*/
- /*
- * TODO - should really only allow lossless profiles. Below reflects
- * Tcl 8.7 alphas prior to encoding profiles
- */
-
moveBytes = inStatePtr->inEofChar == '\0' /* No eofChar to stop input */
&& inStatePtr->inputTranslation == TCL_TRANSLATE_LF
&& outStatePtr->outputTranslation == TCL_TRANSLATE_LF
&& inStatePtr->encoding == outStatePtr->encoding
- && CHANNEL_PROFILE_GET(inStatePtr->flags) != TCL_ENCODING_PROFILE_STRICT
- && CHANNEL_PROFILE_GET(outStatePtr->flags) == TCL_ENCODING_PROFILE_TCL8;
+ && CHANNEL_PROFILE_GET(inStatePtr->inputEncodingFlags) == TCL_ENCODING_PROFILE_TCL8
+ && CHANNEL_PROFILE_GET(outStatePtr->outputEncodingFlags) == TCL_ENCODING_PROFILE_TCL8;
/*
* Allocate a new CopyState to maintain info about the current copy in
@@ -9799,8 +9794,8 @@ CopyData(
inBinary = (inStatePtr->encoding == NULL);
outBinary = (outStatePtr->encoding == NULL);
sameEncoding = inStatePtr->encoding == outStatePtr->encoding
- && CHANNEL_PROFILE_GET(inStatePtr->flags) != TCL_ENCODING_PROFILE_STRICT
- && CHANNEL_PROFILE_GET(outStatePtr->flags) == TCL_ENCODING_PROFILE_TCL8;
+ && CHANNEL_PROFILE_GET(inStatePtr->inputEncodingFlags) == TCL_ENCODING_PROFILE_TCL8
+ && CHANNEL_PROFILE_GET(outStatePtr->outputEncodingFlags) == TCL_ENCODING_PROFILE_TCL8;
if (!(inBinary || sameEncoding)) {
TclNewObj(bufObj);