summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--set.c4
-rw-r--r--set.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/set.c b/set.c
index 74137b775f..5e23c20efa 100644
--- 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);
}
diff --git a/set.h b/set.h
index b206ba80f6..d8ef7aa540 100644
--- a/set.h
+++ b/set.h
@@ -18,6 +18,7 @@ Set* set_copy(Set *s);
void set_free(Set* s);
int set_put(Set *s, void *value);
+int set_replace(Set *s, void *value);
void *set_get(Set *s, void *value);
void *set_remove(Set *s, void *value);