Go to the source code of this file.
◆ hashset_itr_t
◆ hashset_iterator()
Create a hashset iterator. The caller should then iterate over the hashset as follows:
...
}
void HASHMAP free(HASHMAP(t) *hashmap)
Free all memory used by the given hashmap.
Definition hashmap.h:121
void * hashset_iterator_value(hashset_itr_t itr)
Returns the value at the current index. The called should check hashset_iterator_has_next before call...
Definition hashset_itr.c:78
int hashset_iterator_next(hashset_itr_t itr)
Advance to the next value in the hashset. This returns a non-negative number (the current index) if t...
Definition hashset_itr.c:56
hashset_itr_t hashset_iterator(hashset_t set)
Create a hashset iterator. The caller should then iterate over the hashset as follows:
Definition hashset_itr.c:26
Definition hashset_itr.h:29
The caller must call free() on this iterator after using it.
◆ hashset_iterator_has_next()
Return 1 if there is a next value in the hashset and 0 otherwise.
◆ hashset_iterator_next()
Advance to the next value in the hashset. This returns a non-negative number (the current index) if there is a next item and -1 otherwise.
◆ hashset_iterator_value()
Returns the value at the current index. The called should check hashset_iterator_has_next before calling this.