1.1 --- a/src/cx/hash_map.h Tue Mar 21 17:21:20 2023 +0100 1.2 +++ b/src/cx/hash_map.h Tue Mar 28 19:13:33 2023 +0200 1.3 @@ -70,6 +70,9 @@ 1.4 * 1.5 * If \p buckets is zero, an implementation defined default will be used. 1.6 * 1.7 + * If \p itemsize is CX_STORE_POINTERS, the created map will be created as if 1.8 + * cxMapStorePointers() was called immediately after creation. 1.9 + * 1.10 * @note Iterators provided by this hash map implementation provide the remove operation. 1.11 * The index value of an iterator is the incremented when the iterator advanced without removal. 1.12 * In other words, when the iterator is finished, \c index==size . 1.13 @@ -87,27 +90,6 @@ 1.14 ); 1.15 1.16 /** 1.17 - * Convenience function for creating a hash map that is storing pointers. 1.18 - * 1.19 - * If \p buckets is zero, an implementation defined default will be used. 1.20 - * 1.21 - * @param allocator the allocator to use 1.22 - * @param buckets the initial number of buckets in this hash map 1.23 - * @return a pointer to the new hash map 1.24 - */ 1.25 -__attribute__((__nonnull__, __warn_unused_result__)) 1.26 -static inline CxMap *cxHashMapCreateForPointers( 1.27 - CxAllocator *allocator, 1.28 - size_t buckets 1.29 -) { 1.30 - CxMap *map = cxHashMapCreate(allocator, sizeof(void *), buckets); 1.31 - if (map != NULL) { 1.32 - map->store_pointers = true; 1.33 - } 1.34 - return map; 1.35 -} 1.36 - 1.37 -/** 1.38 * Increases the number of buckets, if necessary. 1.39 * 1.40 * The load threshold is \c 0.75*buckets. If the element count exceeds the load