Index: doc/ByteArrObj.3 ================================================================== --- doc/ByteArrObj.3 +++ doc/ByteArrObj.3 @@ -44,14 +44,14 @@ .AP Tcl_Interp *interp in Interpreter to use for error reporting. .AP "Tcl_Size \&| int" *numBytesPtr out Points to space where the number of bytes in the array may be written. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when size of the byte array is larger than INT_MAX -this function will return NULL (which should trigger proper error-handling). -Apart from that, it will function as expected. +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the size of the byte array is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .BE .SH DESCRIPTION .PP These routines are used to create, modify, store, transfer, and retrieve arbitrary binary data in Tcl values. Specifically, data that can be Index: doc/DictObj.3 ================================================================== --- doc/DictObj.3 +++ doc/DictObj.3 @@ -70,15 +70,16 @@ 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 "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. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when size of the dictionary is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +contained within the dictionary placed within it. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the size of the dictionary is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP Tcl_DictSearch *searchPtr in/out Pointer to record to use to keep track of progress in enumerating all key/value pairs in a dictionary. The contents of the record will be initialized by the call to \fBTcl_DictObjFirst\fR. If the enumerating is to be terminated before all values in the dictionary have been Index: doc/FileSystem.3 ================================================================== --- doc/FileSystem.3 +++ doc/FileSystem.3 @@ -268,15 +268,16 @@ 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 "Tcl_Size \&| int" *lenPtr out -Filled with the number of elements in the split path. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when number of elements is larger than INT_MAX -this function will return NULL (which should trigger proper error-handling). -Apart from that, it will function as expected. +Filled with the number of elements in the split path. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the number of elements is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP Tcl_Obj *basePtr in The base path on to which to join the given elements. May be NULL. .AP Tcl_Size objc in The number of elements in \fIobjv\fR. .AP "Tcl_Obj *const" objv[] in Index: doc/ListObj.3 ================================================================== --- doc/ListObj.3 +++ doc/ListObj.3 @@ -59,15 +59,16 @@ For \fBTcl_SetListObj\fR, this points to the Tcl value that will be converted to a list value containing the \fIobjc\fR elements of the array referenced by \fIobjv\fR. .AP "Tcl_Size \&| int" *objcPtr in Points to location where \fBTcl_ListObjGetElements\fR -stores the number of element values in \fIlistPtr\fR. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the list size is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +stores the number of element values in \fIlistPtr\fR. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the list size is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP Tcl_Obj ***objvPtr out A location where \fBTcl_ListObjGetElements\fR stores a pointer to an array of pointers to the element values of \fIlistPtr\fR. .AP Tcl_Size objc in The number of Tcl values that \fBTcl_NewListObj\fR @@ -80,15 +81,16 @@ \fBTcl_NewListObj\fR will insert these values into a new list value and \fBTcl_ListObjReplace\fR will insert them into an existing \fIlistPtr\fR. Each value will become a separate list element. .AP "Tcl_Size \&| int" *lengthPtr out Points to location where \fBTcl_ListObjLength\fR -stores the length of the list. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the list size is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +stores the length of the list. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the list size is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP Tcl_Size index in Index of the list element that \fBTcl_ListObjIndex\fR is to return. The first element has index 0. .AP Tcl_Obj **objPtrPtr out Index: doc/ParseArgs.3 ================================================================== --- doc/ParseArgs.3 +++ doc/ParseArgs.3 @@ -22,15 +22,16 @@ .AP "const Tcl_ArgvInfo" *argTable in Pointer to array of option descriptors. .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. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the number of elements is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +stored in \fIremObjv\fR. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the number of elements is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP "Tcl_Obj *const" *objv in The array of arguments to be parsed. .AP Tcl_Obj ***remObjv out Pointer to a variable that will hold the array of unprocessed arguments. Should be NULL if no return of unprocessed arguments is required. If Index: doc/SplitList.3 ================================================================== --- doc/SplitList.3 +++ doc/SplitList.3 @@ -37,15 +37,16 @@ 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 "Tcl_Size \&| int" *argcPtr out -Filled in with number of elements in \fIlist\fR. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the list size is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +Filled in with number of elements in \fIlist\fR. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the list size is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .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. Index: doc/SplitPath.3 ================================================================== --- doc/SplitPath.3 +++ doc/SplitPath.3 @@ -24,15 +24,16 @@ .AS "const char *const" ***argvPtr in/out .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 "Tcl_Size \&| int" *argcPtr out -Filled in with number of path elements in \fIpath\fR. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the number of elements is larger than INT_MAX -this function will return TCL_ERROR (which should trigger proper error-handling). -Apart from that, it will function as expected. +Filled in with number of path elements in \fIpath\fR. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will return +NULL if the number of elements is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .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. Index: doc/StringObj.3 ================================================================== --- doc/StringObj.3 +++ doc/StringObj.3 @@ -118,14 +118,16 @@ A pointer to a value to read, or to an unshared value to modify. .AP Tcl_Obj *appendObjPtr in The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR. .AP "Tcl_Size \&| int" *lengthPtr out The location where \fBTcl_GetStringFromObj\fR will store the length -of a value's string representation. May be (Tcl_Size *)NULL when not used. If it points to a variable which -type is not \fBTcl_Size\fR, a compiler warning will be generated, in -order to indicate that when the string is larger than INT_MAX -this function will panic. +of a value's string representation. +May be (Tcl_Size *)NULL when not used. If it points to a variable which +type is not \fBTcl_Size\fR, a compiler warning will be generated. +If your extensions is compiled with -DTCL_8_API, this function will +panic if the number of elements is larger than INT_MAX (which should +trigger proper error-handling), otherwise expect it to crash. .AP "const char" *string in Null-terminated string value to append to \fIobjPtr\fR. .AP Tcl_Size limit in Maximum number of bytes to be appended. .AP "const char" *ellipsis in Index: generic/tclDecls.h ================================================================== --- generic/tclDecls.h +++ generic/tclDecls.h @@ -4218,11 +4218,11 @@ # define Tcl_FSSplitPath(pathPtr, lenPtr) \ tclStubsPtr->tclFSSplitPath((pathPtr), (lenPtr)) # undef Tcl_ParseArgsObjv # define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) \ tclStubsPtr->tclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv)) -#elif !defined(TCL_NO_DEPRECATED) +#elif defined(TCL_8_API) # undef Tcl_GetByteArrayFromObj # undef Tcl_GetBytesFromObj # undef Tcl_GetStringFromObj # undef Tcl_GetUnicodeFromObj # undef Tcl_ListObjGetElements @@ -4233,78 +4233,78 @@ # undef Tcl_FSSplitPath # undef Tcl_ParseArgsObjv # if !defined(USE_TCL_STUBS) # define Tcl_GetByteArrayFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ TclGetBytesFromObj(NULL, (objPtr), (sizePtr)) : \ - (Tcl_GetBytesFromObj)(NULL, (objPtr), (sizePtr))) + (Tcl_GetBytesFromObj)(NULL, (objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ TclGetBytesFromObj((interp), (objPtr), (sizePtr)) : \ - (Tcl_GetBytesFromObj)((interp), (objPtr), (sizePtr))) + (Tcl_GetBytesFromObj)((interp), (objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetStringFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ TclGetStringFromObj((objPtr), (sizePtr)) : \ - (Tcl_GetStringFromObj)((objPtr), (sizePtr))) + (Tcl_GetStringFromObj)((objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetUnicodeFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ TclGetUnicodeFromObj((objPtr), (sizePtr)) : \ - (Tcl_GetUnicodeFromObj)((objPtr), (sizePtr))) + (Tcl_GetUnicodeFromObj)((objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_ListObjGetElements(interp, listPtr, objcPtr, objvPtr) (sizeof(*(objcPtr)) <= sizeof(int) ? \ TclListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr)) : \ - (Tcl_ListObjGetElements)((interp), (listPtr), (objcPtr), (objvPtr))) + (Tcl_ListObjGetElements)((interp), (listPtr), (Tcl_Size *)(void *)(objcPtr), (objvPtr))) # define Tcl_ListObjLength(interp, listPtr, lengthPtr) (sizeof(*(lengthPtr)) <= sizeof(int) ? \ TclListObjLength((interp), (listPtr), (lengthPtr)) : \ - (Tcl_ListObjLength)((interp), (listPtr), (lengthPtr))) + (Tcl_ListObjLength)((interp), (listPtr), (Tcl_Size *)(void *)(lengthPtr))) # define Tcl_DictObjSize(interp, dictPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ TclDictObjSize((interp), (dictPtr), (sizePtr)) : \ - (Tcl_DictObjSize)((interp), (dictPtr), (sizePtr))) + (Tcl_DictObjSize)((interp), (dictPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_SplitList(interp, listStr, argcPtr, argvPtr) (sizeof(*(argcPtr)) <= sizeof(int) ? \ TclSplitList((interp), (listStr), (argcPtr), (argvPtr)) : \ - (Tcl_SplitList)((interp), (listStr), (argcPtr), (argvPtr))) + (Tcl_SplitList)((interp), (listStr), (Tcl_Size *)(void *)(argcPtr), (argvPtr))) # define Tcl_SplitPath(path, argcPtr, argvPtr) (sizeof(*(argcPtr)) <= sizeof(int) ? \ TclSplitPath((path), (argcPtr), (argvPtr)) : \ - (Tcl_SplitPath)((path), (argcPtr), (argvPtr))) + (Tcl_SplitPath)((path), (Tcl_Size *)(void *)(argcPtr), (argvPtr))) # define Tcl_FSSplitPath(pathPtr, lenPtr) (sizeof(*(lenPtr)) <= sizeof(int) ? \ TclFSSplitPath((pathPtr), (lenPtr)) : \ - (Tcl_FSSplitPath)((pathPtr), (lenPtr))) + (Tcl_FSSplitPath)((pathPtr), (Tcl_Size *)(void *)(lenPtr))) # define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) (sizeof(*(objcPtr)) <= sizeof(int) ? \ TclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv)) : \ - (Tcl_ParseArgsObjv)((interp), (argTable), (objcPtr), (objv), (remObjv))) + (Tcl_ParseArgsObjv)((interp), (argTable), (Tcl_Size *)(void *)(objcPtr), (objv), (remObjv))) # elif !defined(BUILD_tcl) # define Tcl_GetByteArrayFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ tclStubsPtr->tclGetBytesFromObj(NULL, (objPtr), (sizePtr)) : \ - tclStubsPtr->tcl_GetBytesFromObj(NULL, (objPtr), (sizePtr))) + tclStubsPtr->tcl_GetBytesFromObj(NULL, (objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetBytesFromObj(interp, objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ tclStubsPtr->tclGetBytesFromObj((interp), (objPtr), (sizePtr)) : \ - tclStubsPtr->tcl_GetBytesFromObj((interp), (objPtr), (sizePtr))) + tclStubsPtr->tcl_GetBytesFromObj((interp), (objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetStringFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ tclStubsPtr->tclGetStringFromObj((objPtr), (sizePtr)) : \ - tclStubsPtr->tcl_GetStringFromObj((objPtr), (sizePtr))) + tclStubsPtr->tcl_GetStringFromObj((objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_GetUnicodeFromObj(objPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ tclStubsPtr->tclGetUnicodeFromObj((objPtr), (sizePtr)) : \ - tclStubsPtr->tcl_GetUnicodeFromObj((objPtr), (sizePtr))) + tclStubsPtr->tcl_GetUnicodeFromObj((objPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_ListObjGetElements(interp, listPtr, objcPtr, objvPtr) (sizeof(*(objcPtr)) <= sizeof(int) ? \ tclStubsPtr->tclListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr)) : \ - tclStubsPtr->tcl_ListObjGetElements((interp), (listPtr), (objcPtr), (objvPtr))) + tclStubsPtr->tcl_ListObjGetElements((interp), (listPtr), (Tcl_Size *)(void *)(objcPtr), (objvPtr))) # define Tcl_ListObjLength(interp, listPtr, lengthPtr) (sizeof(*(lengthPtr)) <= sizeof(int) ? \ tclStubsPtr->tclListObjLength((interp), (listPtr), (lengthPtr)) : \ - tclStubsPtr->tcl_ListObjLength((interp), (listPtr), (lengthPtr))) + tclStubsPtr->tcl_ListObjLength((interp), (listPtr), (Tcl_Size *)(void *)(lengthPtr))) # define Tcl_DictObjSize(interp, dictPtr, sizePtr) (sizeof(*(sizePtr)) <= sizeof(int) ? \ tclStubsPtr->tclDictObjSize((interp), (dictPtr), (sizePtr)) : \ - tclStubsPtr->tcl_DictObjSize((interp), (dictPtr), (sizePtr))) + tclStubsPtr->tcl_DictObjSize((interp), (dictPtr), (Tcl_Size *)(void *)(sizePtr))) # define Tcl_SplitList(interp, listStr, argcPtr, argvPtr) (sizeof(*(argcPtr)) <= sizeof(int) ? \ tclStubsPtr->tclSplitList((interp), (listStr), (argcPtr), (argvPtr)) : \ - tclStubsPtr->tcl_SplitList((interp), (listStr), (argcPtr), (argvPtr))) + tclStubsPtr->tcl_SplitList((interp), (listStr), (Tcl_Size *)(void *)(argcPtr), (argvPtr))) # define Tcl_SplitPath(path, argcPtr, argvPtr) (sizeof(*(argcPtr)) <= sizeof(int) ? \ tclStubsPtr->tclSplitPath((path), (argcPtr), (argvPtr)) : \ - tclStubsPtr->tcl_SplitPath((path), (argcPtr), (argvPtr))) + tclStubsPtr->tcl_SplitPath((path), (Tcl_Size *)(void *)(argcPtr), (argvPtr))) # define Tcl_FSSplitPath(pathPtr, lenPtr) (sizeof(*(lenPtr)) <= sizeof(int) ? \ tclStubsPtr->tclFSSplitPath((pathPtr), (lenPtr)) : \ - tclStubsPtr->tcl_FSSplitPath((pathPtr), (lenPtr))) + tclStubsPtr->tcl_FSSplitPath((pathPtr), (Tcl_Size *)(void *)(lenPtr))) # define Tcl_ParseArgsObjv(interp, argTable, objcPtr, objv, remObjv) (sizeof(*(objcPtr)) <= sizeof(int) ? \ tclStubsPtr->tclParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv)) : \ - tclStubsPtr->tcl_ParseArgsObjv((interp), (argTable), (objcPtr), (objv), (remObjv))) + tclStubsPtr->tcl_ParseArgsObjv((interp), (argTable), (Tcl_Size *)(void *)(objcPtr), (objv), (remObjv))) # endif /* defined(USE_TCL_STUBS) */ -#else /* defined(TCL_NO_DEPRECATED) */ +#else /* !defined(TCL_8_API) */ # undef Tcl_GetByteArrayFromObj # define Tcl_GetByteArrayFromObj(objPtr, sizePtr) \ Tcl_GetBytesFromObj(NULL, (objPtr), (sizePtr)) -#endif /* !defined(TCL_NO_DEPRECATED) */ +#endif /* defined(TCL_8_API) */ #endif /* _TCLDECLS */