summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-30 21:46:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-30 21:46:57 (GMT)
commitfdb4ca15676f435f3b9b4b353ca57e7a806b2dbe (patch)
tree4372031dc945d51496f544390ac35904153c13df /generic
parent4d235898611fe66668632c48acbe44e9c86de509 (diff)
parent6c7ad3b1183f1a912bac6ba4fcdf0231749c359e (diff)
downloadtcl-fdb4ca15676f435f3b9b4b353ca57e7a806b2dbe.zip
tcl-fdb4ca15676f435f3b9b4b353ca57e7a806b2dbe.tar.gz
tcl-fdb4ca15676f435f3b9b4b353ca57e7a806b2dbe.tar.bz2
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tcl.h4
-rw-r--r--generic/tclDecls.h4
-rw-r--r--generic/tclEncoding.c12
4 files changed, 11 insertions, 11 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 2a35559..3778de6 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2608,7 +2608,7 @@ declare 682 {
# TIP 643
declare 683 {
- int Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
+ Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
}
# TIP #650
diff --git a/generic/tcl.h b/generic/tcl.h
index 68d6719..c28f421 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -1909,11 +1909,11 @@ typedef struct Tcl_EncodingType {
* encoding is deleted. */
void *clientData; /* Arbitrary value associated with encoding
* type. Passed to conversion functions. */
- int nullSize; /* Number of zero bytes that signify
+ Tcl_Size nullSize; /* Number of zero bytes that signify
* end-of-string in this encoding. This number
* is used to determine the source string
* length when the srcLen argument is
- * negative. Must be 1 or 2. */
+ * negative. Must be 1, 2, or 4. */
} Tcl_EncodingType;
/*
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index d5eaf6d..f219500 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1851,7 +1851,7 @@ EXTERN int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes,
EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp,
Tcl_Channel chan, int mode);
/* 683 */
-EXTERN int Tcl_GetEncodingNulLength(Tcl_Encoding encoding);
+EXTERN Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding);
/* 684 */
EXTERN int Tcl_GetWideUIntFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr);
@@ -2554,7 +2554,7 @@ typedef struct TclStubs {
int (*tcl_GetNumberFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, void **clientDataPtr, int *typePtr); /* 680 */
int (*tcl_GetNumber) (Tcl_Interp *interp, const char *bytes, size_t numBytes, void **clientDataPtr, int *typePtr); /* 681 */
int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */
- int (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
+ Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */
void (*reserved686)(void);
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 5a516f3..ef32d29 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -33,13 +33,13 @@ typedef struct {
Tcl_EncodingFreeProc *freeProc;
/* If non-NULL, function to call when this
* encoding is deleted. */
- int nullSize; /* Number of 0x00 bytes that signify
+ void *clientData; /* Arbitrary value associated with encoding
+ * type. Passed to conversion functions. */
+ size_t nullSize; /* Number of 0x00 bytes that signify
* end-of-string in this encoding. This number
* is used to determine the source string
* length when the srcLen argument is
* negative. This number can be 1, 2, or 4. */
- void *clientData; /* Arbitrary value associated with encoding
- * type. Passed to conversion functions. */
LengthProc *lengthProc; /* Function to compute length of
* null-terminated strings in this encoding.
* If nullSize is 1, this is strlen; if
@@ -830,7 +830,7 @@ FreeEncoding(
*
* Tcl_GetEncodingName --
*
- * Given an encoding, return the name that was used to constuct the
+ * Given an encoding, return the name that was used to construct the
* encoding.
*
* Results:
@@ -933,14 +933,14 @@ Tcl_GetEncodingNames(
* string termination.
*
* Results:
- * The name of the encoding.
+ * The number of nul bytes used for the string termination.
*
* Side effects:
* None.
*
*---------------------------------------------------------------------------
*/
-int
+size_t
Tcl_GetEncodingNulLength(
Tcl_Encoding encoding)
{