diff options
Diffstat (limited to 'src/set.c')
-rw-r--r-- | src/set.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -37,6 +37,15 @@ void set_free(Set* s) { hashmap_free(MAKE_HASHMAP(s)); } +void set_free_free(Set *s) { + void *p; + + while ((p = set_steal_first(s))) + free(p); + + set_free(s); +} + int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func) { return hashmap_ensure_allocated((Hashmap**) s, hash_func, compare_func); } |