#define _cleanup_closedir_ __attribute__((cleanup(closedirp)))
#define _cleanup_umask_ __attribute__((cleanup(umaskp)))
#define _cleanup_set_free_ __attribute__((cleanup(set_freep)))
+#define _cleanup_set_free_free_ __attribute__((cleanup(set_free_freep)))
#define _cleanup_strv_free_ __attribute__((cleanup(strv_freep)))
#define VA_FORMAT_ADVANCE(format, ap) \
hashmap_free_free(MAKE_HASHMAP(s));
}
+void set_free_freep(Set **s) {
+ if (!*s)
+ return;
+
+ set_free_free(*s);
+ *s = NULL;
+}
+
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);
}
void set_free(Set* s);
void set_freep(Set **s);
void set_free_free(Set *s);
+void set_free_freep(Set **s);
Set* set_copy(Set *s);
int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func);