chiark / gitweb /
extend test a little
[elogind.git] / set.c
diff --git a/set.c b/set.c
index 3aa227bbc7aded725c5d12d503c25ddd09e9ab93..5e23c20efadaadf1ce272673c9aea5d9cc19210a 100644 (file)
--- a/set.c
+++ b/set.c
@@ -26,6 +26,10 @@ int set_put(Set *s, void *value) {
         return hashmap_put(MAKE_HASHMAP(s), value, value);
 }
 
+int set_replace(Set *s, void *value) {
+        return hashmap_replace(MAKE_HASHMAP(s), value, value);
+}
+
 void *set_get(Set *s, void *value) {
         return hashmap_get(MAKE_HASHMAP(s), value);
 }
@@ -61,3 +65,15 @@ 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)));
+}
+
+void set_clear(Set *s) {
+        hashmap_clear(MAKE_HASHMAP(s));
+}