chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add missing test code
[elogind.git]
/
set.c
diff --git
a/set.c
b/set.c
index 21a1739b0338bc9b45370cc3592249c8c4664641..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);
}
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);
}
void *set_get(Set *s, void *value) {
return hashmap_get(MAKE_HASHMAP(s), value);
}
@@
-69,3
+73,7
@@
int set_merge(Set *s, Set *other) {
Set* set_copy(Set *s) {
return MAKE_SET(hashmap_copy(MAKE_HASHMAP(s)));
}
Set* set_copy(Set *s) {
return MAKE_SET(hashmap_copy(MAKE_HASHMAP(s)));
}
+
+void set_clear(Set *s) {
+ hashmap_clear(MAKE_HASHMAP(s));
+}