diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-04-30 19:21:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-04-30 19:21:50 (GMT) |
commit | dd6950d63533245dd34e1c0a07c3c90024b7cf97 (patch) | |
tree | 98380b5360e5f550aa8cfa32f82b02f425e84ffb /generic/tclInt.h | |
parent | c3cb435cf41b2fcd2ccfafc7a25033e88b052d73 (diff) | |
parent | 6c4b78cfa8c06ea5963591778902da74850d1985 (diff) | |
download | tcl-dd6950d63533245dd34e1c0a07c3c90024b7cf97.zip tcl-dd6950d63533245dd34e1c0a07c3c90024b7cf97.tar.gz tcl-dd6950d63533245dd34e1c0a07c3c90024b7cf97.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index df708b4..c8ea609 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2451,16 +2451,6 @@ typedef enum TclEolTranslation { #define TCL_INVOKE_NO_UNKNOWN (1<<1) #define TCL_INVOKE_NO_TRACEBACK (1<<2) -#if TCL_MAJOR_VERSION > 8 -/* - * SSIZE_MAX, NOT SIZE_MAX as negative differences need to be expressed - * between values of the Tcl_Size type so limit the range to signed - */ -# define ListSizeT_MAX ((Tcl_Size)PTRDIFF_MAX) -#else -# define ListSizeT_MAX INT_MAX -#endif - /* * ListStore -- * @@ -2501,7 +2491,8 @@ typedef struct ListStore { /* Max number of elements that can be contained in a list */ #define LIST_MAX \ - ((Tcl_Size)((ListSizeT_MAX - offsetof(ListStore, slots)) / sizeof(Tcl_Obj *))) + ((Tcl_Size)(((size_t)TCL_SIZE_MAX - offsetof(ListStore, slots)) \ + / sizeof(Tcl_Obj *))) /* Memory size needed for a ListStore to hold numSlots_ elements */ #define LIST_SIZE(numSlots_) \ ((Tcl_Size)(offsetof(ListStore, slots) + ((numSlots_) * sizeof(Tcl_Obj *)))) |