chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
implement hashmap_copy() and hashmap_merge()
[elogind.git]
/
set.c
diff --git
a/set.c
b/set.c
index 3aa227bbc7aded725c5d12d503c25ddd09e9ab93..21a1739b0338bc9b45370cc3592249c8c4664641 100644
(file)
--- 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)));
+}