--- a/ucx/cx/hash_map.h Fri Jan 03 21:40:57 2025 +0100 +++ b/ucx/cx/hash_map.h Sat Jan 04 13:03:01 2025 +0100 @@ -77,13 +77,16 @@ * In other words, when the iterator is finished, \c index==size . * * @param allocator the allocator to use + * (if \c NULL, a default stdlib allocator will be used) * @param itemsize the size of one element * @param buckets the initial number of buckets in this hash map * @return a pointer to the new hash map */ -__attribute__((__nonnull__, __warn_unused_result__)) +cx_attr_nodiscard +cx_attr_malloc +cx_attr_dealloc(cxMapFree, 1) CxMap *cxHashMapCreate( - CxAllocator const *allocator, + const CxAllocator *allocator, size_t itemsize, size_t buckets ); @@ -122,7 +125,7 @@ * @param map the map to rehash * @return zero on success, non-zero if a memory allocation error occurred */ -__attribute__((__nonnull__)) +cx_attr_nonnull int cxMapRehash(CxMap *map);