diff -r d4baf4dd55c3 -r fe0d69d72bcd src/cx/map.h --- a/src/cx/map.h Thu May 23 19:29:14 2024 +0200 +++ b/src/cx/map.h Thu May 23 20:29:28 2024 +0200 @@ -56,7 +56,10 @@ /** Structure for the UCX map. */ struct cx_map_s { - CX_COLLECTION_MEMBERS + /** + * Base attributes. + */ + CX_COLLECTION_BASE; /** The map class definition. */ cx_map_class *cl; }; @@ -163,7 +166,7 @@ */ __attribute__((__nonnull__)) static inline void cxMapStoreObjects(CxMap *map) { - map->store_pointer = false; + map->base.store_pointer = false; } /** @@ -180,8 +183,8 @@ */ __attribute__((__nonnull__)) static inline void cxMapStorePointers(CxMap *map) { - map->store_pointer = true; - map->item_size = sizeof(void *); + map->base.store_pointer = true; + map->base.item_size = sizeof(void *); } @@ -1050,7 +1053,7 @@ CxMap *map, CxHashKey key ) { - return map->cl->remove(map, key, !map->store_pointer); + return map->cl->remove(map, key, !map->base.store_pointer); } /** @@ -1066,7 +1069,7 @@ CxMap *map, cxstring key ) { - return map->cl->remove(map, cx_hash_key_cxstr(key), !map->store_pointer); + return map->cl->remove(map, cx_hash_key_cxstr(key), !map->base.store_pointer); } /** @@ -1082,7 +1085,7 @@ CxMap *map, cxmutstr key ) { - return map->cl->remove(map, cx_hash_key_cxstr(key), !map->store_pointer); + return map->cl->remove(map, cx_hash_key_cxstr(key), !map->base.store_pointer); } /** @@ -1098,7 +1101,7 @@ CxMap *map, char const *key ) { - return map->cl->remove(map, cx_hash_key_str(key), !map->store_pointer); + return map->cl->remove(map, cx_hash_key_str(key), !map->base.store_pointer); } /**