summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2022-07-23 16:04:53 (GMT)
committergriffin <briang42@easystreet.net>2022-07-23 16:04:53 (GMT)
commiteb4b6b9d490eb059e61c8f369026c914cb0f2c7d (patch)
treed7c53d8180a0b302c5967edfc011287fe43550e8 /generic/tclInt.h
parent91d2dee1010be253cb830d0e45bb10cdc17ac523 (diff)
parentb2ce09bd9ec3b2ac58805ee94ff4cccaba69a67f (diff)
downloadtcl-eb4b6b9d490eb059e61c8f369026c914cb0f2c7d.zip
tcl-eb4b6b9d490eb059e61c8f369026c914cb0f2c7d.tar.gz
tcl-eb4b6b9d490eb059e61c8f369026c914cb0f2c7d.tar.bz2
sync up with core-8-brnach.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 76ac062..76b6469 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2440,14 +2440,14 @@ typedef struct List {
* derived from the list representation. May
* be ignored if there is no string rep at
* all.*/
- Tcl_Obj *elements; /* First list element; the struct is grown to
+ Tcl_Obj *elements[TCLFLEXARRAY]; /* First list element; the struct is grown to
* accommodate all elements. */
} List;
#define LIST_MAX \
- (1 + (int)(((size_t)UINT_MAX - sizeof(List))/sizeof(Tcl_Obj *)))
+ ((int)(((size_t)UINT_MAX - offsetof(List, elements))/sizeof(Tcl_Obj *)))
#define LIST_SIZE(numElems) \
- (unsigned)(sizeof(List) + (((numElems) - 1) * sizeof(Tcl_Obj *)))
+ (TCL_HASH_TYPE)(offsetof(List, elements) + ((numElems) * sizeof(Tcl_Obj *)))
/*
* Macro used to get the elements of a list object.
@@ -2457,7 +2457,7 @@ typedef struct List {
((List *) (listPtr)->internalRep.twoPtrValue.ptr1)
#define ListObjGetElements(listPtr, objc, objv) \
- ((objv) = &(ListRepPtr(listPtr)->elements), \
+ ((objv) = ListRepPtr(listPtr)->elements, \
(objc) = ListRepPtr(listPtr)->elemCount)
#define ListObjLength(listPtr, len) \