summaryrefslogtreecommitdiff
path: root/set.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-18 23:49:49 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-18 23:49:49 +0100
commit91cdde8a7a08c6797995cc67f4b55ac43780cdd8 (patch)
treee6bcc2d96a186a47b3076e0a95f495933dc5d9bd /set.h
parent3efd4195676c3880771b9f5e3b3bd9ff35c5ad4b (diff)
implement hashmap_copy() and hashmap_merge()
Diffstat (limited to 'set.h')
-rw-r--r--set.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/set.h b/set.h
index 9aefdbcb56..a2e405941c 100644
--- a/set.h
+++ b/set.h
@@ -14,21 +14,24 @@
typedef struct Set Set;
Set *set_new(hash_func_t hash_func, compare_func_t compare_func);
-void set_free(Set* set);
+Set* set_copy(Set *s);
+void set_free(Set* s);
int set_put(Set *s, void *value);
void *set_get(Set *s, void *value);
void *set_remove(Set *s, void *value);
+int set_merge(Set *s, Set *other);
+
unsigned set_size(Set *s);
bool set_isempty(Set *s);
-void *set_iterate(Set *h, void **state);
-void *set_iterate_backwards(Set *h, void **state);
+void *set_iterate(Set *s, void **state);
+void *set_iterate_backwards(Set *s, void **state);
-void *set_steal_first(Set *h);
-void* set_first(Set *h);
-void* set_last(Set *h);
+void *set_steal_first(Set *s);
+void* set_first(Set *s);
+void* set_last(Set *s);
#define SET_FOREACH(e, s, state) \
for ((state) = NULL, (e) = set_iterate((s), &(state)); (e); (e) = set_iterate((s), &(state)))