summaryrefslogtreecommitdiffstats
path: root/src/hashset.h
blob: 7e035c02eab25e504226b58c8ffaad90f66075c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef foohashsethfoo
#define foohashsethfoo

struct hashset;

struct hashset *hashset_new(unsigned (*hash_func) (const void *p), int (*compare_func) (const void*a, const void*b));
void hashset_free(struct hashset*, void (*free_func)(void *p, void *userdata), void *userdata);

int hashset_put(struct hashset *h, const void *key, void *value);
void* hashset_get(struct hashset *h, const void *key);

int hashset_remove(struct hashset *h, const void *key);

unsigned hashset_ncontents(struct hashset *h);

#endif