--- a/src/cx/hash_map.h Sun Dec 28 15:45:39 2025 +0100 +++ b/src/cx/hash_map.h Sun Dec 28 17:31:20 2025 +0100 @@ -38,10 +38,6 @@ #include "map.h" -#ifdef __cplusplus -extern "C" { -#endif - /** Internal structure for an element of a hash map. */ struct cx_hash_map_element_s; @@ -83,8 +79,8 @@ * @param buckets the initial number of buckets in this hash map * @return a pointer to the new hash map */ -cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxMapFree, 1) -CX_EXPORT CxMap *cxHashMapCreate(const CxAllocator *allocator, +CX_EXTERN CX_NODISCARD CX_MALLOC CX_DEALLOC(cxMapFree, 1) +CxMap *cxHashMapCreate(const CxAllocator *allocator, size_t itemsize, size_t buckets); /** @@ -106,12 +102,7 @@ * @retval zero success * @retval non-zero if a memory allocation error occurred */ -cx_attr_nonnull -CX_EXPORT int cxMapRehash(CxMap *map); - - -#ifdef __cplusplus -} // extern "C" -#endif +CX_EXTERN CX_NONNULL +int cxMapRehash(CxMap *map); #endif // UCX_HASH_MAP_H