diff options
| -rw-r--r-- | doc/ByteArrObj.3 | 8 | ||||
| -rw-r--r-- | doc/Encoding.3 | 2 | ||||
| -rw-r--r-- | doc/Number.3 | 2 | ||||
| -rw-r--r-- | generic/tcl.decls | 2 | ||||
| -rw-r--r-- | generic/tclBinary.c | 3 | ||||
| -rw-r--r-- | generic/tclDecls.h | 4 |
6 files changed, 8 insertions, 13 deletions
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3 index 285239d..8ddc28c 100644 --- a/doc/ByteArrObj.3 +++ b/doc/ByteArrObj.3 @@ -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 "Tcl_Size | int" *numBytesPtr out +.AP 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 @@ -153,11 +153,7 @@ and any string representation is invalidated. .PP 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 -\fBTcl_Size\fR or of type \fBint\fR. In Tcl 8, the largest number of -bytes possible is \fBINT_MAX\fR, so either type can receive the value. -In codebases meant to migrate to Tcl 9, the option to write to a space -of type \fBTcl_Size\fR may aid in the migration. +to the space pointed to by \fInumBytesPtr\fR. .PP \fBTcl_SetByteArrayLength\fR enables a caller to change the size of a byte-array in the internal representation of an unshared \fIobjPtr\fR to diff --git a/doc/Encoding.3 b/doc/Encoding.3 index ce729b9..c357ecd 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -147,7 +147,7 @@ buffer as a result of the conversion. May be NULL. .AP int *dstCharsPtr out Filled with the number of characters that correspond to the number of bytes stored in the output buffer. May be NULL. -.AP Tcl_Size *errorIdxPtr out +.AP int *errorIdxPtr out Filled with the index of the byte or character that caused the encoding transform to fail. May be NULL. .AP Tcl_DString *bufPtr out diff --git a/doc/Number.3 b/doc/Number.3 index 696dd80..4642c10 100644 --- a/doc/Number.3 +++ b/doc/Number.3 @@ -27,7 +27,7 @@ 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 Tcl_Size numBytes in +.AP int 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 be examined until the first \fBNUL\fR byte terminates examination. diff --git a/generic/tcl.decls b/generic/tcl.decls index 5880031..4572817 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -144,7 +144,7 @@ declare 32 { } # Only available in Tcl 8.x, NULL in Tcl 9.0 declare 33 { - unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *numBytesPtr) + unsigned char *Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, Tcl_Size *numBytesPtr) } declare 34 { int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr) diff --git a/generic/tclBinary.c b/generic/tclBinary.c index b6394a4..9c47dd4 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -471,11 +471,10 @@ Tcl_GetBytesFromObj( *---------------------------------------------------------------------- */ -#undef Tcl_GetByteArrayFromObj unsigned char * Tcl_GetByteArrayFromObj( Tcl_Obj *objPtr, /* The ByteArray object. */ - int *numBytesPtr) /* If non-NULL, write the number of bytes + Tcl_Size *numBytesPtr) /* If non-NULL, write the number of bytes * in the array here */ { ByteArray *baPtr; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index d6cbd03..101a883 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -159,7 +159,7 @@ EXTERN int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 33 */ EXTERN unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, - int *numBytesPtr); + Tcl_Size *numBytesPtr); /* 34 */ EXTERN int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr); @@ -2073,7 +2073,7 @@ typedef struct TclStubs { void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */ int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *intPtr); /* 31 */ int (*tcl_GetBooleanFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); /* 32 */ - unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, int *numBytesPtr); /* 33 */ + unsigned char * (*tcl_GetByteArrayFromObj) (Tcl_Obj *objPtr, Tcl_Size *numBytesPtr); /* 33 */ int (*tcl_GetDouble) (Tcl_Interp *interp, const char *src, double *doublePtr); /* 34 */ int (*tcl_GetDoubleFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); /* 35 */ TCL_DEPRECATED_API("No longer in use, changed to macro") int (*tcl_GetIndexFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, const char *const *tablePtr, const char *msg, int flags, int *indexPtr); /* 36 */ |
