summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-14 15:25:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-14 15:25:47 (GMT)
commit41c87a4bf59377b2fcccc1d36a2812032e7a56e3 (patch)
tree608d868f57bc33fcb01ad5d61731d6357d7f6c04 /generic/tclInt.h
parenta41449f1cd90f78d0810898baea3568d4adabf39 (diff)
downloadtcl-41c87a4bf59377b2fcccc1d36a2812032e7a56e3.zip
tcl-41c87a4bf59377b2fcccc1d36a2812032e7a56e3.tar.gz
tcl-41c87a4bf59377b2fcccc1d36a2812032e7a56e3.tar.bz2
More progress
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 5a59e39..03b2f12 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2381,18 +2381,18 @@ typedef enum TclEolTranslation {
#define TCL_INVOKE_NO_TRACEBACK (1<<2)
/*
- * TclListSizeT is the type for holding list element counts. It's defined
+ * ListSizeT is the type for holding list element counts. It's defined
* simplify sharing source between Tcl8 and Tcl9.
*/
#if TCL_MAJOR_VERSION > 8
-typedef ptrdiff_t ListSizeT; /* TODO - may need to fix to match Tcl9's API */
+typedef size_t ListSizeT;
/*
* SSIZE_MAX, NOT SIZE_MAX as negative differences need to be expressed
* between values of the ListSizeT type so limit the range to signed
*/
-#define ListSizeT_MAX PTRDIFF_MAX
+#define ListSizeT_MAX ((ListSizeT)PTRDIFF_MAX)
#else
@@ -2441,11 +2441,11 @@ typedef struct ListStore {
/* Max number of elements that can be contained in a list */
#define LIST_MAX \
- ((ListSizeT)(((size_t)ListSizeT_MAX - offsetof(ListStore, slots)) \
- / sizeof(Tcl_Obj *)))
+ ((ListSizeT_MAX - offsetof(ListStore, slots)) \
+ / sizeof(Tcl_Obj *))
/* Memory size needed for a ListStore to hold numSlots_ elements */
#define LIST_SIZE(numSlots_) \
- ((int)(offsetof(ListStore, slots) + ((numSlots_) * sizeof(Tcl_Obj *))))
+ (offsetof(ListStore, slots) + ((numSlots_) * sizeof(Tcl_Obj *)))
/*
* ListSpan --