summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-16 17:05:07 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-16 17:05:07 (GMT)
commite645e12652b53c5aa9b86783f6b7b9d3db3be9ea (patch)
tree79e088bf7c27a97bfbb26c31686e6214d98003c5
parentc899e7770147960aafc497624551c39fff43471c (diff)
downloadtcl-e645e12652b53c5aa9b86783f6b7b9d3db3be9ea.zip
tcl-e645e12652b53c5aa9b86783f6b7b9d3db3be9ea.tar.gz
tcl-e645e12652b53c5aa9b86783f6b7b9d3db3be9ea.tar.bz2
Update manpages for TIP 660. Also one size_t -> Tcl_Size change in public API
-rw-r--r--doc/AddErrInfo.312
-rw-r--r--doc/ByteArrObj.38
-rw-r--r--doc/Class.32
-rw-r--r--doc/Concat.32
-rw-r--r--doc/CrtAlias.32
-rw-r--r--doc/CrtChannel.32
-rw-r--r--doc/CrtObjCmd.32
-rw-r--r--doc/CrtTrace.36
-rw-r--r--doc/DString.38
-rw-r--r--doc/DetachPids.32
-rw-r--r--doc/DictObj.34
-rw-r--r--doc/Encoding.310
-rw-r--r--doc/FileSystem.34
-rw-r--r--doc/IntObj.314
-rw-r--r--doc/Limit.32
-rw-r--r--doc/LinkVar.32
-rw-r--r--doc/ListObj.36
-rw-r--r--doc/Number.36
-rw-r--r--doc/Object.34
-rw-r--r--doc/OpenFileChnl.342
-rw-r--r--doc/ParseArgs.32
-rw-r--r--doc/ParseCmd.314
-rw-r--r--doc/RegExp.316
-rw-r--r--doc/SetRecLmt.34
-rw-r--r--doc/SplitList.316
-rw-r--r--doc/SplitPath.36
-rw-r--r--doc/StringObj.320
-rw-r--r--doc/TclZlib.36
-rw-r--r--doc/Tcl_Main.32
-rw-r--r--doc/ToUpper.36
-rw-r--r--doc/Utf.324
-rw-r--r--generic/tcl.decls2
-rw-r--r--generic/tclDecls.h4
-rw-r--r--generic/tclObj.c4
34 files changed, 136 insertions, 130 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3
index 3968820..7290a27 100644
--- a/doc/AddErrInfo.3
+++ b/doc/AddErrInfo.3
@@ -54,14 +54,14 @@ For \fBTcl_AddObjErrorInfo\fR,
this points to the first byte of an array of \fIlength\fR bytes
containing a string to append to the \fB\-errorinfo\fR return option.
This byte array may contain embedded null bytes
-unless \fIlength\fR is TCL_INDEX_NONE.
+unless \fIlength\fR is negative.
.AP Tcl_Obj *objPtr in
A message to be appended to the \fB\-errorinfo\fR return option
in the form of a Tcl_Obj value.
-.AP size_t length in
+.AP Tcl_Size length in
The number of bytes to copy from \fImessage\fR when
appending to the \fB\-errorinfo\fR return option.
-If TCL_INDEX_NONE, all bytes up to the first null byte are used.
+If negative, all bytes up to the first null byte are used.
.AP Tcl_Obj *errorObjPtr in
The \fB\-errorcode\fR return option will be set to this value.
.AP "const char" *element in
@@ -76,8 +76,8 @@ The line number of a script where an error occurred.
Pointer to first character in script containing command (must be <= command)
.AP "const char" *command in
Pointer to first character in command that generated the error
-.AP size_t commandLength in
-Number of bytes in command; TCL_INDEX_NONE means use all bytes up to first null byte
+.AP Tcl_Size commandLength in
+Number of bytes in command; a negative value means use all bytes up to first null byte
.BE
.SH DESCRIPTION
.PP
@@ -227,7 +227,7 @@ embedded null bytes. This is essentially never a good idea.
If the \fImessage\fR needs to contain the null character \fBU+0000\fR,
Tcl's usual internal encoding rules should be used to avoid
the need for a null byte. If the \fBTcl_AddObjErrorInfo\fR
-interface is used at all, it should be with a TCL_INDEX_NONE \fIlength\fR value.
+interface is used at all, it should be with a negative \fIlength\fR value.
.PP
The procedure \fBTcl_SetObjErrorCode\fR is used to set the
\fB\-errorcode\fR return option to the list value \fIerrorObjPtr\fR
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3
index 69f55d6..32e042f 100644
--- a/doc/ByteArrObj.3
+++ b/doc/ByteArrObj.3
@@ -34,7 +34,7 @@ unsigned char *
.AP "const unsigned char" *bytes in
The array of bytes used to initialize or set a byte-array value. May be NULL
even if \fInumBytes\fR is non-zero.
-.AP size_t numBytes in
+.AP Tcl_Size numBytes in
The number of bytes in the array.
.AP Tcl_Obj *objPtr in/out
For \fBTcl_SetByteArrayObj\fR, this points to an unshared value to be
@@ -43,7 +43,7 @@ overwritten by a byte-array value. For \fBTcl_GetBytesFromObj\fR,
to the value from which to extract an array of bytes.
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
-.AP "size_t \&| int" *numBytesPtr out
+.AP "Tcl_Size \&| int" *numBytesPtr out
Points to space where the number of bytes in the array may be written.
Caller may pass NULL when it does not need this information.
.BE
@@ -134,8 +134,8 @@ and any string representation is invalidated.
On success, both \fBTcl_GetBytesFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
write the number of bytes in the byte-array value of \fIobjPtr\fR
to the space pointed to by \fInumBytesPtr\fR. This space may be of type
-\fBsize_t\fR or of type \fBint\fR. It is recommended that callers provide
-a \fBsize_t\fR space for this purpose. If the caller provides only
+\fBTcl_Size\fR or of type \fBint\fR. It is recommended that callers provide
+a \fBTcl_Size\fR space for this purpose. If the caller provides only
an \fBint\fR space and the number of bytes in the byte-array value of
\fIobjPtr\fR is greater than \fBINT_MAX\fR, the routine will fail due
to being unable to correctly report the byte-array size to the caller.
diff --git a/doc/Class.3 b/doc/Class.3
index 508b864..888347f 100644
--- a/doc/Class.3
+++ b/doc/Class.3
@@ -85,7 +85,7 @@ already exist.
The number of elements in the \fIobjv\fR array.
.AP "Tcl_Obj *const" *objv in
The arguments to the command to create the instance of the class.
-.AP size_t skip in
+.AP Tcl_Size skip in
The number of arguments at the start of the argument array, \fIobjv\fR, that
are not arguments to any constructors. This allows the generation of correct
error messages even when complicated calling patterns are used (e.g., via the
diff --git a/doc/Concat.3 b/doc/Concat.3
index 10b4a10..af30cd1 100644
--- a/doc/Concat.3
+++ b/doc/Concat.3
@@ -18,7 +18,7 @@ const char *
\fBTcl_Concat\fR(\fIargc, argv\fR)
.SH ARGUMENTS
.AS "const char *const" argv[]
-.AP size_t argc in
+.AP Tcl_Size argc in
Number of strings.
.AP "const char *const" argv[] in
Array of strings to concatenate. Must have \fIargc\fR entries.
diff --git a/doc/CrtAlias.3 b/doc/CrtAlias.3
index 0deb17b..eec8ed6 100644
--- a/doc/CrtAlias.3
+++ b/doc/CrtAlias.3
@@ -69,7 +69,7 @@ Name of source command for alias.
Interpreter that contains the target command for an alias.
.AP "const char" *targetCmd in
Name of target command for alias in \fItargetInterp\fR.
-.AP size_t argc in
+.AP Tcl_Size argc in
Count of additional arguments to pass to the alias command.
.AP "const char *const" *argv in
Vector of strings, the additional arguments to pass to the alias command.
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index f04fbff..6a62c0f 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -141,7 +141,7 @@ means the output handle is wanted.
.AP void **handlePtr out
Points to the location where the desired OS-specific handle should be
stored.
-.AP size_t size in
+.AP Tcl_Size size in
The size, in bytes, of buffers to allocate in this channel.
.AP int mask in
An OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index ffd9e27..7ba71eb 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -187,7 +187,7 @@ except its \fIproc2\fR argument is of type \fBTcl_ObjCmdProc2\fR.
typedef int \fBTcl_ObjCmdProc2\fR(
void *\fIclientData\fR,
Tcl_Interp *\fIinterp\fR,
- size_t \fIobjc\fR,
+ ptrdiff_t \fIobjc\fR,
Tcl_Obj *const \fIobjv\fR[]);
.CE
.PP
diff --git a/doc/CrtTrace.3 b/doc/CrtTrace.3
index e4d1a43..cfd3303 100644
--- a/doc/CrtTrace.3
+++ b/doc/CrtTrace.3
@@ -29,7 +29,7 @@ Tcl_Trace
.AS Tcl_CmdObjTraceDeleteProc *deleteProc
.AP Tcl_Interp *interp in
Interpreter containing command to be traced or untraced.
-.AP size_t level in
+.AP Tcl_Size level in
Only commands at or below this nesting level will be traced unless
0 is specified. 1 means
top-level commands only, 2 means top-level commands or those that are
@@ -88,10 +88,10 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
typedef int \fBTcl_CmdObjTraceProc2\fR(
\fBvoid *\fR \fIclientData\fR,
\fBTcl_Interp\fR* \fIinterp\fR,
- size_t \fIlevel\fR,
+ ptrdiff_t \fIlevel\fR,
const char *\fIcommand\fR,
\fBTcl_Command\fR \fIcommandToken\fR,
- size_t \fIobjc\fR,
+ ptrdiff_t \fIobjc\fR,
\fBTcl_Obj\fR *const \fIobjv\fR[]);
.CE
.PP
diff --git a/doc/DString.3 b/doc/DString.3
index 5c4d8f4..ed2f429 100644
--- a/doc/DString.3
+++ b/doc/DString.3
@@ -26,7 +26,7 @@ char *
.sp
\fBTcl_DStringEndSublist\fR(\fIdsPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_DStringLength\fR(\fIdsPtr\fR)
.sp
char *
@@ -51,10 +51,10 @@ Pointer to structure that is used to manage a dynamic string.
Pointer to characters to append to dynamic string.
.AP "const char" *element in
Pointer to characters to append as list element to dynamic string.
-.AP size_t length in
-Number of bytes from \fIbytes\fR to add to dynamic string. If TCL_INDEX_NONE,
+.AP Tcl_Size length in
+Number of bytes from \fIbytes\fR to add to dynamic string. If negative,
add all characters up to null terminating character.
-.AP size_t newLength in
+.AP Tcl_Size newLength in
New length for dynamic string, not including null terminating
character.
.AP Tcl_Interp *interp in/out
diff --git a/doc/DetachPids.3 b/doc/DetachPids.3
index c4d6fa7..bff345a 100644
--- a/doc/DetachPids.3
+++ b/doc/DetachPids.3
@@ -22,7 +22,7 @@ Tcl_Pid
\fBTcl_WaitPid\fR(\fIpid, statusPtr, options\fR)
.SH ARGUMENTS
.AS Tcl_Pid *statusPtr out
-.AP size_t numPids in
+.AP Tcl_Size numPids in
Number of process ids contained in the array pointed to by \fIpidPtr\fR.
.AP int *pidPtr in
Address of array containing \fInumPids\fR process ids.
diff --git a/doc/DictObj.3 b/doc/DictObj.3
index ebff7bf..c046a42 100644
--- a/doc/DictObj.3
+++ b/doc/DictObj.3
@@ -70,7 +70,7 @@ Points to a variable that will have the value from a key/value pair
placed within it. For \fBTcl_DictObjFirst\fR and
\fBTcl_DictObjNext\fR, this may be NULL to indicate that the caller is
not interested in the value.
-.AP "size_t \&| int" *sizePtr out
+.AP "Tcl_Size \&| int" *sizePtr out
Points to a variable that will have the number of key/value pairs
contained within the dictionary placed within it.
.AP Tcl_DictSearch *searchPtr in/out
@@ -84,7 +84,7 @@ returned, the search record \fImust\fR be passed to
Points to a variable that will have a non-zero value written into it
when the enumeration of the key/value pairs in a dictionary has
completed, and a zero otherwise.
-.AP size_t keyc in
+.AP Tcl_Size keyc in
Indicates the number of keys that will be supplied in the \fIkeyv\fR
array.
.AP "Tcl_Obj *const" *keyv in
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index 942d4c1..a1eb265 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -25,13 +25,13 @@ int
char *
\fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
-size_t
+int
\fBTcl_ExternalToUtfDStringEx\fR(\fIinterp, encoding, src, srcLen, flags, dstPtr, errorIdxPtr\fR)
.sp
char *
\fBTcl_UtfToExternalDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
-size_t
+int
\fBTcl_UtfToExternalDStringEx\fR(\fIinterp, encoding, src, srcLen, flags, dstPtr, errorIdxPtr\fR)
.sp
int
@@ -45,7 +45,7 @@ int
const char *
\fBTcl_GetEncodingName\fR(\fIencoding\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_GetEncodingNulLength\fR(\fIencoding\fR)
.sp
int
@@ -86,7 +86,7 @@ specified encoding that are to be converted to UTF-8. For the
UTF-8 characters to be converted to the specified encoding.
.AP "const TCHAR" *tsrc in
An array of Windows TCHAR characters to convert to UTF-8.
-.AP size_t srcLen in
+.AP Tcl_Size srcLen in
Length of \fIsrc\fR or \fItsrc\fR in bytes. If the length is negative, the
encoding-specific length of the string is used.
.AP Tcl_DString *dstPtr out
@@ -347,7 +347,7 @@ typedef struct Tcl_EncodingType {
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
Tcl_EncodingFreeProc *\fIfreeProc\fR;
void *\fIclientData\fR;
- size_t \fInullSize\fR;
+ Tcl_Size \fInullSize\fR;
} \fBTcl_EncodingType\fR;
.CE
.PP
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 5c78083..c25e28f 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -222,7 +222,7 @@ to \fBpath\fR type.
The list of path elements to operate on with a \fBjoin\fR operation.
.AP Tcl_Size elements in
The number of elements in the \fIlistObj\fR which should
-be joined together. If TCL_INDEX_NONE, then all elements are joined.
+be joined together. If negative, then all elements are joined.
.AP Tcl_Obj **errorPtr out
In the case of an error, filled with a value containing the name of
the file which caused an error in the various copy/rename operations.
@@ -838,7 +838,7 @@ The \fBTcl_Filesystem\fR structure contains the following fields:
.CS
typedef struct Tcl_Filesystem {
const char *\fItypeName\fR;
- size_t \fIstructureLength\fR;
+ Tcl_Size \fIstructureLength\fR;
Tcl_FSVersion \fIversion\fR;
Tcl_FSPathInFilesystemProc *\fIpathInFilesystemProc\fR;
Tcl_FSDupInternalRepProc *\fIdupInternalRepProc\fR;
diff --git a/doc/IntObj.3 b/doc/IntObj.3
index d2954c8..f3683c2 100644
--- a/doc/IntObj.3
+++ b/doc/IntObj.3
@@ -43,6 +43,9 @@ int
int
\fBTcl_GetWideUIntFromObj\fR(\fIinterp, objPtr, uwidePtr\fR)
.sp
+int
+\fBTcl_GetSizeIntFromObj\fR(\fIinterp, objPtr, sizePtr\fR)
+.sp
.sp
\fB#include <tclTomMath.h>\fR
.sp
@@ -61,7 +64,7 @@ int
\fBTcl_InitBignumFromDouble\fR(\fIinterp, doubleValue, bigValue\fR)
.SH ARGUMENTS
.AS Tcl_WideInt doubleValue in/out
-.AP size_t endValue in
+.AP Tcl_Size endValue in
\fBTcl_GetIntForIndex\fR will return this when the input value is "end".
.AP int intValue in
Integer value used to initialize or set a Tcl value.
@@ -83,12 +86,14 @@ retrieval fails.
Points to place to store the integer value retrieved from \fIobjPtr\fR.
.AP long *longPtr out
Points to place to store the long integer value retrieved from \fIobjPtr\fR.
-.AP size_t *indexPtr out
-Points to place to store the size_t value retrieved from \fIobjPtr\fR.
+.AP Tcl_Size *indexPtr out
+Points to place to store the Tcl_Size value retrieved from \fIobjPtr\fR.
.AP Tcl_WideInt *widePtr out
Points to place to store the wide integer value retrieved from \fIobjPtr\fR.
.AP Tcl_WideUInt *uwidePtr out
Points to place to store the unsigned wide integer value retrieved from \fIobjPtr\fR.
+.AP Tcl_Size *sizePtr out
+Points to place to store the \fBTcl_Size\fR integer value retrieved from \fIobjPtr\fR.
.AP mp_int *bigValue in/out
Points to a multi-precision integer structure declared by the LibTomMath
library.
@@ -138,7 +143,8 @@ of \fIobjPtr\fR may be changed to make subsequent calls to the
same routine more efficient.
.PP
The \fBTcl_GetIntFromObj\fR, \fBTcl_GetLongFromObj\fR,
-\fBTcl_GetWideIntFromObj\fR, \fBTcl_GetBignumFromObj\fR, and
+\fBTcl_GetWideIntFromObj\fR, \fBTcl_GetSizeIntFromObj\fR,
+\fBTcl_GetBignumFromObj\fR, and
\fBTcl_TakeBignumFromObj\fR routines attempt to retrieve an integral
value of the appropriate type from the Tcl value \fIobjPtr\fR. If the
attempt succeeds, then \fBTCL_OK\fR is returned, and the value is
diff --git a/doc/Limit.3 b/doc/Limit.3
index 43e92f0..60817e9 100644
--- a/doc/Limit.3
+++ b/doc/Limit.3
@@ -65,7 +65,7 @@ its limits checked.
.AP int type in
The type of limit that the operation refers to. This must be either
\fBTCL_LIMIT_COMMANDS\fR or \fBTCL_LIMIT_TIME\fR.
-.AP size_t commandLimit in
+.AP Tcl_Size commandLimit in
The maximum number of commands (as reported by \fBinfo cmdcount\fR)
that may be executed in the interpreter.
.AP Tcl_Time *timeLimitPtr in/out
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index f7ce3a3..42211c5 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.3
@@ -59,7 +59,7 @@ In \fBTcl_LinkArray\fR, the additional linked types \fBTCL_LINK_CHARS\fR and
All the above for both functions may be
optionally OR'ed with \fBTCL_LINK_READ_ONLY\fR to make the Tcl
variable read-only.
-.AP size_t size in
+.AP Tcl_Size size in
.VS "TIP 312"
The number of elements in the C array. Must be greater than zero.
.VE "TIP 312"
diff --git a/doc/ListObj.3 b/doc/ListObj.3
index 7c35603..8d6c0d9 100644
--- a/doc/ListObj.3
+++ b/doc/ListObj.3
@@ -184,7 +184,7 @@ if the conversion fails, it returns \fBTCL_ERROR\fR
and leaves an error message in the interpreter's result value
if \fIinterp\fR is not NULL.
If the index is out of range,
-that is, \fIindex\fR is TCL_INDEX_NONE or
+that is, \fIindex\fR is negative or
greater than or equal to the number of elements in the list,
\fBTcl_ListObjIndex\fR stores a NULL in \fIobjPtrPtr\fR
and returns \fBTCL_OK\fR.
@@ -203,13 +203,13 @@ and leaves an error message in the interpreter's result value
if \fIinterp\fR is not NULL.
Otherwise, it returns \fBTCL_OK\fR after replacing the values.
If \fIobjv\fR is NULL, no new elements are added.
-If the argument \fIfirst\fR is zero or TCL_INDEX_NONE,
+If the argument \fIfirst\fR is zero or negative,
it refers to the first element.
If \fIfirst\fR is greater than or equal to the
number of elements in the list, then no elements are deleted;
the new elements are appended to the list.
\fIcount\fR gives the number of elements to replace.
-If \fIcount\fR is zero or TCL_INDEX_NONE then no elements are deleted;
+If \fIcount\fR is zero or negative then no elements are deleted;
the new elements are simply inserted before the one
designated by \fIfirst\fR.
\fBTcl_ListObjReplace\fR invalidates \fIlistPtr\fR's
diff --git a/doc/Number.3 b/doc/Number.3
index f405060..1bf018a 100644
--- a/doc/Number.3
+++ b/doc/Number.3
@@ -27,9 +27,9 @@ When non-NULL, error information is recorded here when the value is not
in any of the numeric formats recognized by Tcl.
.AP "const char" *bytes in
Points to first byte of the string value to be examined.
-.AP size_t numBytes in
+.AP Tcl_Size numBytes in
The number of bytes, starting at \fIbytes\fR, that should be examined.
-If the value \fBTCL_INDEX_NONE\fR is provided, then all bytes should
+If \fBnumBytes\fR is negative, then all bytes should
be examined until the first \fBNUL\fR byte terminates examination.
.AP "void *" *clientDataPtr out
Points to space where a pointer value may be written through which a numeric
@@ -63,7 +63,7 @@ the same function. They differ only in how the arguments present the Tcl
value to be examined. \fBTcl_GetNumber\fR accepts a counted string
value in the arguments \fIbytes\fR and \fInumBytes\fR (or a
\fBNUL\fR-terminated string value when \fInumBytes\fR is
-\fBTCL_INDEX_NONE\fR). \fBTcl_GetNumberFromObj\fR accepts the Tcl value
+negative). \fBTcl_GetNumberFromObj\fR accepts the Tcl value
in \fIobjPtr\fR.
.PP
Both routines examine the Tcl value and determine whether Tcl recognizes
diff --git a/doc/Object.3 b/doc/Object.3
index 91ee397..fc79643 100644
--- a/doc/Object.3
+++ b/doc/Object.3
@@ -111,9 +111,9 @@ which is defined as follows.
.PP
.CS
typedef struct Tcl_Obj {
- size_t \fIrefCount\fR;
+ Tcl_Size \fIrefCount\fR;
char *\fIbytes\fR;
- size_t \fIlength\fR;
+ Tcl_Size \fIlength\fR;
const Tcl_ObjType *\fItypePtr\fR;
union {
long \fIlongValue\fR;
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index e90ac33..3a7b6ae 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -53,28 +53,28 @@ int
int
\fBTcl_Read\fR(\fIchannel, readBuf, bytesToRead\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_GetsObj\fR(\fIchannel, lineObjPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_Ungets\fR(\fIchannel, input, inputLen, addAtEnd\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_WriteObj\fR(\fIchannel, writeObjPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_WriteChars\fR(\fIchannel, charBuf, bytesToWrite\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_Write\fR(\fIchannel, byteBuf, bytesToWrite\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_ReadRaw\fR(\fIchannel, readBuf, bytesToRead\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_WriteRaw\fR(\fIchannel, byteBuf, bytesToWrite\fR)
.sp
int
@@ -119,7 +119,7 @@ allowed for the \fImode\fR argument to the Tcl \fBopen\fR command.
.AP int permissions in
POSIX-style permission flags such as 0644. If a new file is created, these
permissions will be set on the created file.
-.AP size_t argc in
+.AP Tcl_Size argc in
The number of elements in \fIargv\fR.
.AP "const char" **argv in
Arguments for constructing a command pipeline. These values have the same
@@ -154,7 +154,7 @@ from a procedure such as \fBTcl_OpenFileChannel\fR.
.AP Tcl_Obj *readObjPtr in/out
A pointer to a Tcl value in which to store the characters read from the
channel.
-.AP size_t charsToRead in
+.AP Tcl_Size charsToRead in
The number of characters to read from the channel. If the channel's encoding
is \fBbinary\fR, this is equivalent to the number of bytes to read from the
channel.
@@ -163,7 +163,7 @@ If non-zero, data read from the channel will be appended to the value.
Otherwise, the data will replace the existing contents of the value.
.AP char *readBuf out
A buffer in which to store the bytes read from the channel.
-.AP size_t bytesToRead in
+.AP Tcl_Size bytesToRead in
The number of bytes to read from the channel. The buffer \fIreadBuf\fR must
be large enough to hold this many bytes.
.AP Tcl_Obj *lineObjPtr in/out
@@ -176,7 +176,7 @@ channel. Must have been initialized by the caller. The line read will be
appended to any data already in the dynamic string.
.AP "const char" *input in
The input to add to a channel buffer.
-.AP size_t inputLen in
+.AP Tcl_Size inputLen in
Length of the input
.AP int addAtEnd in
Flag indicating whether the input should be added to the end or
@@ -187,7 +187,7 @@ A pointer to a Tcl value whose contents will be output to the channel.
A buffer containing the characters to output to the channel.
.AP "const char" *byteBuf in
A buffer containing the bytes to output to the channel.
-.AP size_t bytesToWrite in
+.AP Tcl_Size bytesToWrite in
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
output to the channel.
.AP "long long" offset in
@@ -406,10 +406,10 @@ to UTF-8 based on the channel's encoding and storing the produced data in
\fIreadObjPtr\fR's string representation. The return value of
\fBTcl_ReadChars\fR is the number of characters, up to \fIcharsToRead\fR,
that were stored in \fIreadObjPtr\fR. If an error occurs while reading, the
-return value is TCL_INDEX_NONE and \fBTcl_ReadChars\fR records a POSIX error code that
+return value is -1 and \fBTcl_ReadChars\fR records a POSIX error code that
can be retrieved with \fBTcl_GetErrno\fR.
.PP
-Setting \fIcharsToRead\fR to TCL_INDEX_NONE will cause the command to read
+Setting \fIcharsToRead\fR to -1 will cause the command to read
all characters currently available (non-blocking) or everything until
eof (blocking mode).
.PP
@@ -471,14 +471,14 @@ character(s) are read and discarded.
.PP
If a line was successfully read, the return value is greater than or equal
to zero and indicates the number of bytes stored in \fIlineObjPtr\fR. If an
-error occurs, \fBTcl_GetsObj\fR returns TCL_INDEX_NONE and records a POSIX error code
+error occurs, \fBTcl_GetsObj\fR returns -1 and records a POSIX error code
that can be retrieved with \fBTcl_GetErrno\fR. \fBTcl_GetsObj\fR also
-returns TCL_INDEX_NONE if the end of the file is reached; the \fBTcl_Eof\fR procedure
+returns -1 if the end of the file is reached; the \fBTcl_Eof\fR procedure
can be used to distinguish an error from an end-of-file condition.
.PP
-If the channel is in nonblocking mode, the return value can also be TCL_INDEX_NONE
+If the channel is in nonblocking mode, the return value can also be -1
if no data was available or the data that was available did not contain an
-end-of-line character. When TCL_INDEX_NONE is returned, the \fBTcl_InputBlocked\fR
+end-of-line character. When -1 is returned, the \fBTcl_InputBlocked\fR
procedure may be invoked to determine if the channel is blocked because
of input unavailability.
.PP
@@ -496,7 +496,7 @@ head of the queue. If \fIchannel\fR has a
.QW sticky
EOF set, no data will be
added to the input queue. \fBTcl_Ungets\fR returns \fIinputLen\fR or
-TCL_INDEX_NONE if an error occurs.
+-1 if an error occurs.
.SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE"
.PP
\fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at
@@ -513,7 +513,7 @@ to appear as soon as a complete line is accepted for output, set the
\fB\-buffering\fR option on the channel to \fBline\fR mode.
.PP
The return value of \fBTcl_WriteChars\fR is a count of how many bytes were
-accepted for output to the channel. This is either TCL_INDEX_NONE to
+accepted for output to the channel. This is either -1 to
indicate that an error occurred or another number greater than
zero to indicate success. If an error occurs, \fBTcl_WriteChars\fR records
a POSIX error code that may be retrieved with \fBTcl_GetErrno\fR.
diff --git a/doc/ParseArgs.3 b/doc/ParseArgs.3
index 6a5184f..7f81fb7 100644
--- a/doc/ParseArgs.3
+++ b/doc/ParseArgs.3
@@ -21,7 +21,7 @@ int
Where to store error messages.
.AP "const Tcl_ArgvInfo" *argTable in
Pointer to array of option descriptors.
-.AP "size_t \&| int" *objcPtr in/out
+.AP "Tcl_Size \&| int" *objcPtr in/out
A pointer to variable holding number of arguments in \fIobjv\fR. Will be
modified to hold number of arguments left in the unprocessed argument list
stored in \fIremObjv\fR.
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 5235325..0919299 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.3
@@ -45,7 +45,7 @@ For \fBTcl_EvalTokensStandard\fR, determines the context for evaluating
the script and also is used for error reporting; must not be NULL.
.AP "const char" *start in
Pointer to first character in string to parse.
-.AP size_t numBytes in
+.AP Tcl_Size numBytes in
Number of bytes in string to parse, not including any terminating null
character. If less than 0 then the script consists of all characters
following \fIstart\fR up to the first null character.
@@ -196,20 +196,20 @@ return parse information in two data structures, Tcl_Parse and Tcl_Token:
.CS
typedef struct Tcl_Parse {
const char *\fIcommentStart\fR;
- size_t \fIcommentSize\fR;
+ Tcl_Size \fIcommentSize\fR;
const char *\fIcommandStart\fR;
- size_t \fIcommandSize\fR;
- size_t \fInumWords\fR;
+ Tcl_Size \fIcommandSize\fR;
+ Tcl_Size \fInumWords\fR;
Tcl_Token *\fItokenPtr\fR;
- size_t \fInumTokens\fR;
+ Tcl_Size \fInumTokens\fR;
...
} \fBTcl_Parse\fR;
typedef struct Tcl_Token {
int \fItype\fR;
const char *\fIstart\fR;
- size_t \fIsize\fR;
- size_t \fInumComponents\fR;
+ Tcl_Size \fIsize\fR;
+ Tcl_Size \fInumComponents\fR;
} \fBTcl_Token\fR;
.CE
.PP
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index 86c3a55..f173b02 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -64,7 +64,7 @@ identifies the beginning of the larger string.
If it is not the same as \fItext\fR, then no
.QW \fB^\fR
matches will be allowed.
-.AP size_t index in
+.AP Tcl_Size index in
Specifies which range is desired: 0 means the range of the entire
match, 1 or greater means the range that matched a parenthesized
sub-expression.
@@ -80,14 +80,14 @@ OR-ed combination of the compilation flags \fBTCL_REG_ADVANCED\fR,
\fBTCL_REG_QUOTE\fR, \fBTCL_REG_NOCASE\fR, \fBTCL_REG_NEWLINE\fR,
\fBTCL_REG_NLSTOP\fR, \fBTCL_REG_NLANCH\fR, \fBTCL_REG_NOSUB\fR, and
\fBTCL_REG_CANMATCH\fR. See below for more information.
-.AP size_t offset in
+.AP Tcl_Size offset in
The character offset into the text where matching should begin.
The value of the offset has no impact on \fB^\fR matches. This
behavior is controlled by \fIeflags\fR.
-.AP size_t nmatches in
+.AP Tcl_Size nmatches in
The number of matching subexpressions that should be remembered for
later use. If this value is 0, then no subexpression match
-information will be computed. If the value is TCL_INDEX_NONE, then
+information will be computed. If the value is negative, then
all of the matching subexpressions will be remembered. Any other
value will be taken as the maximum number of subexpressions to
remember.
@@ -337,9 +337,9 @@ defined as follows:
.PP
.CS
typedef struct Tcl_RegExpInfo {
- size_t \fInsubs\fR;
+ Tcl_Size \fInsubs\fR;
Tcl_RegExpIndices *\fImatches\fR;
- size_t \fIextendStart\fR;
+ Tcl_Size \fIextendStart\fR;
} \fBTcl_RegExpInfo\fR;
.CE
.PP
@@ -355,8 +355,8 @@ follows:
.PP
.CS
typedef struct Tcl_RegExpIndices {
- size_t \fIstart\fR;
- size_t \fIend\fR;
+ Tcl_Size \fIstart\fR;
+ Tcl_Size \fIend\fR;
} \fBTcl_RegExpIndices\fR;
.CE
.PP
diff --git a/doc/SetRecLmt.3 b/doc/SetRecLmt.3
index 0358cc9..171d29d 100644
--- a/doc/SetRecLmt.3
+++ b/doc/SetRecLmt.3
@@ -14,14 +14,14 @@ Tcl_SetRecursionLimit \- set maximum allowable nesting depth in interpreter
.nf
\fB#include <tcl.h>\fR
.sp
-size_t
+Tcl_Size
\fBTcl_SetRecursionLimit\fR(\fIinterp, depth\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
Interpreter whose recursion limit is to be set.
Must be greater than zero.
-.AP size_t depth in
+.AP Tcl_Size depth in
New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
.BE
diff --git a/doc/SplitList.3 b/doc/SplitList.3
index 6d9a9aa..cc156ee 100644
--- a/doc/SplitList.3
+++ b/doc/SplitList.3
@@ -20,16 +20,16 @@ int
char *
\fBTcl_Merge\fR(\fIargc, argv\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_ScanElement\fR(\fIsrc, flagsPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_ScanCountedElement\fR(\fIsrc, length, flagsPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_ConvertElement\fR(\fIsrc, dst, flags\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_ConvertCountedElement\fR(\fIsrc, length, dst, flags\fR)
.SH ARGUMENTS
.AS "const char *const" ***argvPtr out
@@ -38,14 +38,14 @@ Interpreter to use for error reporting. If NULL, then no error message
is left.
.AP "const char" *list in
Pointer to a string with proper list structure.
-.AP "size_t \&| int" *argcPtr out
+.AP "Tcl_Size \&| int" *argcPtr out
Filled in with number of elements in \fIlist\fR.
.AP "const char" ***argvPtr out
\fI*argvPtr\fR will be filled in with the address of an array of
pointers to the strings that are the extracted elements of \fIlist\fR.
There will be \fI*argcPtr\fR valid entries in the array, followed by
a NULL entry.
-.AP size_t argc in
+.AP Tcl_Size argc in
Number of elements in \fIargv\fR.
.AP "const char *const" *argv in
Array of strings to merge together into a single list.
@@ -55,7 +55,7 @@ String that is to become an element of a list.
.AP int *flagsPtr in
Pointer to word to fill in with information about \fIsrc\fR.
The value of *\fIflagsPtr\fR must be passed to \fBTcl_ConvertElement\fR.
-.AP size_t length in
+.AP Tcl_Size length in
Number of bytes in string \fIsrc\fR.
.AP char *dst in
Place to copy converted list element. Must contain enough characters
@@ -81,7 +81,7 @@ For example, suppose that you have called \fBTcl_SplitList\fR with
the following code:
.PP
.CS
-size_t argc;
+Tcl_Size argc;
int code;
char *string;
char **argv;
diff --git a/doc/SplitPath.3 b/doc/SplitPath.3
index 10e84f5..1e90ab0 100644
--- a/doc/SplitPath.3
+++ b/doc/SplitPath.3
@@ -25,14 +25,14 @@ Tcl_PathType
.AP "const char" *path in
File path in a form appropriate for the current platform (see the
\fBfilename\fR manual entry for acceptable forms for path names).
-.AP "size_t \&| int" *argcPtr out
+.AP "Tcl_Size \&| int" *argcPtr out
Filled in with number of path elements in \fIpath\fR.
.AP "const char" ***argvPtr out
\fI*argvPtr\fR will be filled in with the address of an array of
pointers to the strings that are the extracted elements of \fIpath\fR.
There will be \fI*argcPtr\fR valid entries in the array, followed by
a NULL entry.
-.AP size_t argc in
+.AP Tcl_Size argc in
Number of elements in \fIargv\fR.
.AP "const char *const" *argv in
Array of path elements to merge together into a single path.
@@ -61,7 +61,7 @@ For example, suppose that you have called \fBTcl_SplitPath\fR with the
following code:
.PP
.CS
-size_t argc;
+Tcl_Size argc;
char *path;
char **argv;
\&...
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index e6144aa..b995171 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -87,32 +87,32 @@ Tcl_Obj *
Points to the first byte of an array of UTF-8-encoded bytes
used to set or append to a string value.
This byte array may contain embedded null characters
-unless \fInumChars\fR is \fBTCL_INDEX_NONE\fR. (Applications needing null bytes
+unless \fInumChars\fR is negative. (Applications needing null bytes
should represent them as the two-byte sequence \fI\e300\e200\fR, use
\fBTcl_ExternalToUtf\fR to convert, or \fBTcl_NewByteArrayObj\fR if
the string is a collection of uninterpreted bytes.)
.AP Tcl_Size length in
The number of bytes to copy from \fIbytes\fR when
initializing, setting, or appending to a string value.
-If \fBTCL_INDEX_NONE\fR, all bytes up to the first null are used.
+If negative, all bytes up to the first null are used.
.AP "const Tcl_UniChar" *unicode in
Points to the first byte of an array of Unicode characters
used to set or append to a string value.
This byte array may contain embedded null characters
-unless \fInumChars\fR is \fBTCL_INDEX_NONE\fR.
+unless \fInumChars\fR is negative.
.AP Tcl_Size numChars in
The number of Unicode characters to copy from \fIunicode\fR when
initializing, setting, or appending to a string value.
-If \fBTCL_INDEX_NONE\fR, all characters up to the first null character are used.
+If negative, all characters up to the first null character are used.
.AP Tcl_Size index in
The index of the Unicode character to return.
.AP Tcl_Size first in
The index of the first Unicode character in the Unicode range to be
-returned as a new value. If \fBTCL_INDEX_NONE\fR, behave the same as if the
+returned as a new value. If negative, behave the same as if the
value was 0.
.AP Tcl_Size last in
The index of the last Unicode character in the Unicode range to be
-returned as a new value. If \fBTCL_INDEX_NONE\fR, take all characters up to
+returned as a new value. If negative, take all characters up to
the last one available.
.AP Tcl_Obj *objPtr in/out
Points to a value to manipulate.
@@ -213,8 +213,8 @@ it references a low surrogate preceded by a high surrogate, it returns -1;
characters between \fIfirst\fR and \fIlast\fR (inclusive) in the value's
Unicode representation. If the value's Unicode representation
is invalid, the Unicode representation is regenerated from the value's
-string representation. If \fIfirst\fR == TCL_INDEX_NONE, then the returned
-string starts at the beginning of the value. If \fIlast\fR == TCL_INDEX_NONE,
+string representation. If \fIfirst\fR is negative, then the returned
+string starts at the beginning of the value. If \fIlast\fR negative,
then the returned string ends at the end of the value.
.PP
\fBTcl_GetCharLength\fR returns the number of characters (as opposed
@@ -263,7 +263,7 @@ all \fIlength\fR bytes that are available from being appended, then the
appending is done so that the last bytes appended are from the
string \fIellipsis\fR. This allows for an indication of the truncation
to be left in the string.
-When \fIlength\fR is \fBTCL_INDEX_NONE\fR, all bytes up to the first zero byte are appended,
+When \fIlength\fR is negative, all bytes up to the first zero byte are appended,
subject to the limit. When \fIellipsis\fR is NULL, the default
string \fB...\fR is used. When \fIellipsis\fR is non-NULL, it must point
to a zero-byte-terminated string in Tcl's internal UTF encoding.
@@ -306,7 +306,7 @@ functionality is needed.
.CS
char buf[SOME_SUITABLE_LENGTH];
sprintf(buf, format, ...);
-\fBTcl_NewStringObj\fR(buf, \fBTCL_INDEX_NONE\fR);
+\fBTcl_NewStringObj\fR(buf, -1);
.CE
.PP
but with greater convenience and no need to
diff --git a/doc/TclZlib.3 b/doc/TclZlib.3
index bd37f9c..619b2dc 100644
--- a/doc/TclZlib.3
+++ b/doc/TclZlib.3
@@ -88,7 +88,7 @@ The initial value for the checksum algorithm.
.AP "unsigned char" *bytes in
An array of bytes to run the checksum algorithm over, or NULL to get the
recommended initial value for the checksum algorithm.
-.AP size_t length in
+.AP Tcl_Size length in
The number of bytes in the array.
.AP int mode in
What mode to operate the stream in. Should be either
@@ -107,8 +107,8 @@ if the currently compressed data must be made available for access using
into a state where the decompressor can recover from on corruption, or
\fBTCL_ZLIB_FINALIZE\fR to ensure that the stream is finished and that any
trailer demanded by the format is written.
-.AP size_t count in
-The maximum number of bytes to get from the stream, or TCL_INDEX_NONE to get
+.AP Tcl_Size count in
+The maximum number of bytes to get from the stream, or -1 to get
all remaining bytes from the stream's buffers.
.AP Tcl_Obj *compDict in
A byte array value that is the compression dictionary to use with the stream.
diff --git a/doc/Tcl_Main.3 b/doc/Tcl_Main.3
index c208711..8277262 100644
--- a/doc/Tcl_Main.3
+++ b/doc/Tcl_Main.3
@@ -29,7 +29,7 @@ Tcl_Obj *
\fBTcl_SetMainLoop\fR(\fImainLoopProc\fR)
.SH ARGUMENTS
.AS Tcl_MainLoopProc *mainLoopProc
-.AP size_t argc in
+.AP Tcl_Size argc in
Number of elements in \fIargv\fR.
.AP char *argv[] in
Array of strings containing command-line arguments. On Windows, when
diff --git a/doc/ToUpper.3 b/doc/ToUpper.3
index 86d2f98..089e120 100644
--- a/doc/ToUpper.3
+++ b/doc/ToUpper.3
@@ -22,13 +22,13 @@ int
int
\fBTcl_UniCharToTitle\fR(\fIch\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToUpper\fR(\fIstr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToLower\fR(\fIstr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToTitle\fR(\fIstr\fR)
.SH ARGUMENTS
.AS char *str in/out
diff --git a/doc/Utf.3 b/doc/Utf.3
index 31cc333..5f75a3e 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -15,16 +15,16 @@ Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UtfToChar16, Tcl_UtfToWChar
.sp
typedef ... \fBTcl_UniChar\fR;
.sp
-size_t
+Tcl_Size
\fBTcl_UniCharToUtf\fR(\fIch, buf\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToChar16\fR(\fIsrc, uPtr\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfToWChar\fR(\fIsrc, wPtr\fR)
.sp
char *
@@ -93,7 +93,7 @@ int
const char *
\fBTcl_UtfAtIndex\fR(\fIsrc, index\fR)
.sp
-size_t
+Tcl_Size
\fBTcl_UtfBackslash\fR(\fIsrc, readPtr, dst\fR)
.SH ARGUMENTS
.AS "const Tcl_UniChar" *uniPattern in/out
@@ -132,16 +132,16 @@ A null-terminated utf-16 string.
A null-terminated utf-16 string.
.AP "const unsigned short" *utf16Pattern in
A null-terminated utf-16 string.
-.AP size_t length in
+.AP Tcl_Size length in
The length of the UTF-8 string in bytes (not UTF-8 characters). If
-TCL_INDEX_NONE, all bytes up to the first null byte are used.
-.AP size_t uniLength in
+negative, all bytes up to the first null byte are used.
+.AP Tcl_Size uniLength in
The length of the Unicode string in characters.
.AP "Tcl_DString" *dsPtr in/out
A pointer to a previously initialized \fBTcl_DString\fR.
.AP "const char" *start in
Pointer to the beginning of a UTF-8 string.
-.AP size_t index in
+.AP Tcl_Size index in
The index of a character (not byte) in the UTF-8 string.
.AP int *readPtr out
If non-NULL, filled with the number of bytes in the backslash sequence,
@@ -254,7 +254,7 @@ know if a full Unicode character has been seen.
\fBTcl_NumUtfChars\fR corresponds to \fBstrlen\fR for UTF-8 strings. It
returns the number of Tcl_UniChars that are represented by the UTF-8 string
\fIsrc\fR. The length of the source string is \fIlength\fR bytes. If the
-length is TCL_INDEX_NONE, all bytes up to the first null byte are used.
+length is negative, all bytes up to the first null byte are used.
.PP
\fBTcl_UtfFindFirst\fR corresponds to \fBstrchr\fR for UTF-8 strings. It
returns a pointer to the first occurrence of the Unicode character \fIch\fR
@@ -299,13 +299,13 @@ byte \fIsrc[0]\fR nor the byte \fIstart[-1]\fR nor the byte
Pascal Ord() function. It returns the Unicode character represented at the
specified character (not byte) \fIindex\fR in the UTF-8 string
\fIsrc\fR. The source string must contain at least \fIindex\fR
-characters. If \fIindex\fR is TCL_INDEX_NONE or \fIindex\fR points
+characters. If \fIindex\fR is negative or \fIindex\fR points
to the second half of a surrogate pair, it returns -1.
.PP
\fBTcl_UtfAtIndex\fR returns a pointer to the specified character (not
byte) \fIindex\fR in the UTF-8 string \fIsrc\fR. The source string must
contain at least \fIindex\fR characters. This is equivalent to calling
-\fBTcl_UtfToUniChar\fR \fIindex\fR times. If \fIindex\fR is TCL_INDEX_NONE,
+\fBTcl_UtfToUniChar\fR \fIindex\fR times. If \fIindex\fR is negative,
the return pointer points to the first character in the source string.
.PP
\fBTcl_UtfBackslash\fR is a utility procedure used by several of the Tcl
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 079a8ec..0b3daa3 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2601,7 +2601,7 @@ declare 680 {
void **clientDataPtr, int *typePtr)
}
declare 681 {
- int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes, size_t numBytes,
+ int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes, Tcl_Size numBytes,
void **clientDataPtr, int *typePtr)
}
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 502dc76..89ff26c 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -1849,7 +1849,7 @@ EXTERN int Tcl_GetNumberFromObj(Tcl_Interp *interp,
int *typePtr);
/* 681 */
EXTERN int Tcl_GetNumber(Tcl_Interp *interp, const char *bytes,
- size_t numBytes, void **clientDataPtr,
+ Tcl_Size numBytes, void **clientDataPtr,
int *typePtr);
/* 682 */
EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp,
@@ -2559,7 +2559,7 @@ typedef struct TclStubs {
Tcl_Command (*tcl_NRCreateCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc, Tcl_ObjCmdProc2 *nreProc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 678 */
int (*tcl_NRCallObjProc2) (Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2, void *clientData, ptrdiff_t objc, Tcl_Obj *const objv[]); /* 679 */
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_GetNumber) (Tcl_Interp *interp, const char *bytes, Tcl_Size numBytes, void **clientDataPtr, int *typePtr); /* 681 */
int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 682 */
Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */
int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 6a2d7d7..38953d8 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3646,7 +3646,7 @@ int
Tcl_GetNumber(
Tcl_Interp *interp,
const char *bytes,
- size_t numBytes,
+ Tcl_Size numBytes,
void **clientDataPtr,
int *typePtr)
{
@@ -3660,7 +3660,7 @@ Tcl_GetNumber(
bytes = &tclEmptyString;
numBytes = 0;
}
- if (numBytes == (size_t)TCL_INDEX_NONE) {
+ if (numBytes < 0) {
numBytes = strlen(bytes);
}
if (numBytes > INT_MAX) {