diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-31 19:24:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-31 19:24:35 (GMT) |
commit | fc78297f13c393edaa5b39e0fa3c1af3e26b0cfc (patch) | |
tree | ea38df857c83022aa89b18bb8fb9c392ccab900e /generic/tclIO.c | |
parent | cc936d0713b9e1b725a3296ecf05ab40139290e6 (diff) | |
download | tcl-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.c | 13 |
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); |