diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-24 18:05:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-03-24 18:05:07 (GMT) |
commit | c0486b6292304d174e8326def761da371c85bcc8 (patch) | |
tree | d96c246ff1af5503783da44aefb6ca35d972e344 /generic/tclEncoding.c | |
parent | ceadda7eccad9e1d9ab05fc0f8c9fb17e7572381 (diff) | |
download | tcl-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.c | 24 |
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; |