From e3a119b910a3735de914e686fd4643c0064654bc Mon Sep 17 00:00:00 2001 From: Fabrice Date: Fri, 20 Mar 2026 19:00:37 +0100 Subject: move to impl --- cheesemap.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'cheesemap.h') diff --git a/cheesemap.h b/cheesemap.h index 9d7139d..d49bfce 100644 --- a/cheesemap.h +++ b/cheesemap.h @@ -94,22 +94,10 @@ struct cheesemap { struct cheesemap_raw raw; }; -static inline void cm_new(struct cheesemap* map, uintptr_t entry_size, +void cm_new(struct cheesemap* map, uintptr_t entry_size, uint8_t* mem_usr, cm_malloc_fn malloc, cm_free_fn free, uint8_t* map_usr, cm_hash_fn hash, - cm_compare_fn compare) { - assert(map != NULL); - assert(malloc != NULL && free != NULL); - assert(hash != NULL && compare != NULL); - - struct cheesemap_fns fns = { - mem_usr, map_usr, // - malloc, free, // - hash, compare, // - }; - - *map = (struct cheesemap){entry_size, fns, cm_raw_new()}; -} + cm_compare_fn compare); static inline void cm_drop(struct cheesemap* map) { assert(map != NULL); -- cgit v1.2.3