]> begriffs open source - libderp/blob - include/hashmap.h
Allow multiple ASAN_OPTIONS in test scripts
[libderp] / include / hashmap.h
1 #ifndef LIBDERP_HASHMAP_H
2 #define LIBDERP_HASHMAP_H
3
4 #include "common.h"
5
6 #include <stdbool.h>
7 #include <stddef.h>
8
9 typedef struct hashmap hashmap;
10
11 hashmap * hm_new(size_t, hashfn *, comparator *, void *cmp_aux);
12 void      hm_free(hashmap *);
13 void      hm_dtor(hashmap *, dtor *key_dtor, dtor *val_dtor, void *aux);
14 size_t    hm_length(const hashmap *);
15 bool      hm_is_empty(const hashmap *);
16 void *    hm_at(const hashmap *, const void *);
17 bool      hm_insert(hashmap *, void *key, void *val);
18 bool      hm_remove(hashmap *, void *);
19 void      hm_clear(hashmap *);
20
21 #endif