summaryrefslogtreecommitdiff
path: root/set.c
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.c
parent3efd4195676c3880771b9f5e3b3bd9ff35c5ad4b (diff)
implement hashmap_copy() and hashmap_merge()
Diffstat (limited to 'set.c')
-rw-r--r--set.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/set.c b/set.c
index 3aa227bbc7..21a1739b03 100644
--- a/set.c
+++ b/set.c
@@ -61,3 +61,11 @@ void* set_first(Set *s) {
void* set_last(Set *s) {
return hashmap_last(MAKE_HASHMAP(s));
}
+
+int set_merge(Set *s, Set *other) {
+ return hashmap_merge(MAKE_HASHMAP(s), MAKE_HASHMAP(other));
+}
+
+Set* set_copy(Set *s) {
+ return MAKE_SET(hashmap_copy(MAKE_HASHMAP(s)));
+}