summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-24 18:05:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-24 18:05:07 (GMT)
commitc0486b6292304d174e8326def761da371c85bcc8 (patch)
treed96c246ff1af5503783da44aefb6ca35d972e344 /generic/tclEncoding.c
parentceadda7eccad9e1d9ab05fc0f8c9fb17e7572381 (diff)
downloadtcl-c0486b6292304d174e8326def761da371c85bcc8.zip
tcl-c0486b6292304d174e8326def761da371c85bcc8.tar.gz
tcl-c0486b6292304d174e8326def761da371c85bcc8.tar.bz2
(cherry-pick): Change Tcl_ExternalToUtfDStringEx and Tcl_UtfToExternalDStringEx to ignore START/END
flags as stated in documentation instead of raising an error.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 39c6ee3..c3bd36d 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1285,18 +1285,6 @@ Tcl_ExternalToUtfDStringEx(
/* DO FIRST - Must always be initialized before returning */
Tcl_DStringInit(dstPtr);
- if (flags & (TCL_ENCODING_START|TCL_ENCODING_END)) {
- /* TODO - what other flags are illegal? - See TIP 656 */
- Tcl_SetObjResult(
- interp,
- Tcl_NewStringObj(
- "Parameter error: TCL_ENCODING_{START,STOP} bits set in flags.",
- TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", (void *)NULL);
- errno = EINVAL;
- return TCL_ERROR;
- }
-
dst = Tcl_DStringValue(dstPtr);
dstLen = dstPtr->spaceAvl - 1;
@@ -1587,18 +1575,6 @@ Tcl_UtfToExternalDStringEx(
/* DO FIRST - must always be initialized on return */
Tcl_DStringInit(dstPtr);
- if (flags & (TCL_ENCODING_START|TCL_ENCODING_END)) {
- /* TODO - what other flags are illegal? - See TIP 656 */
- Tcl_SetObjResult(
- interp,
- Tcl_NewStringObj(
- "Parameter error: TCL_ENCODING_{START,STOP} bits set in flags.",
- TCL_INDEX_NONE));
- Tcl_SetErrorCode(interp, "TCL", "ENCODING", "ILLEGALFLAGS", (void *)NULL);
- errno = EINVAL;
- return TCL_ERROR;
- }
-
dst = Tcl_DStringValue(dstPtr);
dstLen = dstPtr->spaceAvl - 1;