diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-23 00:01:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-10-23 00:01:24 (GMT) |
commit | dd5c058db2f142f387695f101f9f6a9ea952bed4 (patch) | |
tree | ecddc0c35aabe38c0656c3cbc3742cf64f0ac846 /generic/tclEncoding.c | |
parent | c74a310d215e2e366750b84c2f2d1f55c8b60372 (diff) | |
parent | 9cfb05d5b2abc38b205ed1c41781ffde314f72b6 (diff) | |
download | tcl-dd5c058db2f142f387695f101f9f6a9ea952bed4.zip tcl-dd5c058db2f142f387695f101f9f6a9ea952bed4.tar.gz tcl-dd5c058db2f142f387695f101f9f6a9ea952bed4.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index cd6aacb..c592145 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -919,6 +919,33 @@ Tcl_GetEncodingNames( } /* + *------------------------------------------------------------------------- + * + * Tcl_GetEncodingNulLength -- + * + * Given an encoding, return the number of nul bytes used for the + * string termination. + * + * Results: + * The name of the encoding. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ +int +Tcl_GetEncodingNulLength( + Tcl_Encoding encoding) +{ + if (encoding == NULL) { + encoding = systemEncoding; + } + + return ((Encoding *) encoding)->nullSize; +} + +/* *------------------------------------------------------------------------ * * Tcl_SetSystemEncoding -- |