1 #ifndef LIBDERP_HASHMAP_H
2 #define LIBDERP_HASHMAP_H
8 typedef struct hashmap hashmap;
10 hashmap * hm_new(size_t,
11 uint_fast32_t (*hash)(const void *),
12 int (*cmp)(const void *, const void *),
13 void (*key_dtor)(void *),
14 void (*val_dtor)(void *));
15 void hm_free(hashmap *);
16 size_t hm_length(const hashmap *);
17 bool hm_is_empty(const hashmap *);
18 void * hm_at(const hashmap *, const void *);
19 bool hm_insert(hashmap *, void *key, void *val);
20 bool hm_remove(hashmap *, void *);
21 void hm_clear(hashmap *);