diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-20 02:12:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-20 02:12:36 +0100 |
commit | f00b3eda2f92b2dcd13c50749ec5e7fce6720b52 (patch) | |
tree | 6cfabb5cdfa2c7c574fb505d452b8846fabbda83 | |
parent | 3158713e0094fd32f58ee80c50ff54210c2dc411 (diff) |
add set_replace()
-rw-r--r-- | set.c | 4 | ||||
-rw-r--r-- | set.h | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -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); } @@ -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); |