Skip to content

Commit

Permalink
Unbreak Tcl9 build (TCL_SIZE_MAX usage)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Aug 27, 2023
1 parent 07f67db commit b0ec1c9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions generic/tclInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -4360,16 +4360,16 @@ MODULE_SCOPE int TclCommandWordLimitError(Tcl_Interp *interp, Tcl_Size count);
*------------------------------------------------------------------------
*/
static inline int TclGetSizeIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr) {
#if TCL_SIZE_MAX == INT_MAX
return TclGetIntFromObj(interp, objPtr, sizePtr);
#else
Tcl_WideInt wide;
if (TclGetWideIntFromObj(interp, objPtr, &wide) != TCL_OK) {
return TCL_ERROR;
if (TCL_SIZE_MAX == INT_MAX) {
return TclGetIntFromObj(interp, objPtr, (int *)sizePtr);
} else {
Tcl_WideInt wide;
if (TclGetWideIntFromObj(interp, objPtr, &wide) != TCL_OK) {
return TCL_ERROR;
}
*sizePtr = (Tcl_Size)wide;
return TCL_OK;
}
*sizePtr = (Tcl_Size)wide;
return TCL_OK;
#endif
}


Expand Down

0 comments on commit b0ec1c9

Please sign in to comment.