diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-18 23:49:49 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-18 23:49:49 +0100 |
commit | 91cdde8a7a08c6797995cc67f4b55ac43780cdd8 (patch) | |
tree | e6bcc2d96a186a47b3076e0a95f495933dc5d9bd /set.c | |
parent | 3efd4195676c3880771b9f5e3b3bd9ff35c5ad4b (diff) |
implement hashmap_copy() and hashmap_merge()
Diffstat (limited to 'set.c')
-rw-r--r-- | set.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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))); +} |