hashset_t hashset_create(unsigned short nbits)
Create a hashset instance. The returned value is a pointer. The caller must call hashset_destroy() to...
Definition hashset.c:29
int hashset_add(hashset_t set, void *item)
Add a pointer to the hashset. Note that 0 and 1 are special values, meaning nil and deleted items....
Definition hashset.c:117
int hashset_is_member(hashset_t set, void *item)
Returns non-zero if the item is in the hashset and zero otherwise.
Definition hashset.c:139
int hashset_remove(hashset_t set, void *item)
Remove an item from the hashset. Return non-zero if the item was removed and zero if the item is not ...
Definition hashset.c:123
void hashset_destroy(hashset_t set)
Destroy the hashset instance, freeing allocated memory.
Definition hashset.c:50
size_t hashset_num_items(hashset_t set)
Return the number of items in the hashset.
Definition hashset.c:48
struct hashset_st * hashset_t
Definition hashset.h:40
void ** items
Definition hashset.h:35
size_t capacity
Definition hashset.h:34
size_t n_deleted_items
Definition hashset.h:37
size_t nitems
Definition hashset.h:36
size_t mask
Definition hashset.h:32
size_t nbits
Definition hashset.h:31