81 * (if @c NULL, the cxDefaultAllocator will be used) |
81 * (if @c NULL, the cxDefaultAllocator will be used) |
82 * @param itemsize the size of one element |
82 * @param itemsize the size of one element |
83 * @param buckets the initial number of buckets in this hash map |
83 * @param buckets the initial number of buckets in this hash map |
84 * @return a pointer to the new hash map |
84 * @return a pointer to the new hash map |
85 */ |
85 */ |
86 cx_attr_nodiscard |
86 cx_attr_nodiscard cx_attr_malloc cx_attr_dealloc(cxMapFree, 1) |
87 cx_attr_malloc |
87 CX_EXPORT CxMap *cxHashMapCreate(const CxAllocator *allocator, |
88 cx_attr_dealloc(cxMapFree, 1) |
88 size_t itemsize, size_t buckets); |
89 cx_attr_export |
|
90 CxMap *cxHashMapCreate( |
|
91 const CxAllocator *allocator, |
|
92 size_t itemsize, |
|
93 size_t buckets |
|
94 ); |
|
95 |
89 |
96 /** |
90 /** |
97 * Creates a new hash map with a default number of buckets. |
91 * Creates a new hash map with a default number of buckets. |
98 * |
92 * |
99 * If @p elem_size is #CX_STORE_POINTERS, the created map stores pointers instead of |
93 * If @p elem_size is #CX_STORE_POINTERS, the created map stores pointers instead of |