summaryrefslogtreecommitdiff
path: root/src/shared/set.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-22 23:12:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-24 00:25:04 -0400
commitef42202ac8ed27e7ff1fc90ef8bc2590046dff25 (patch)
treeb1646eeb8ef5070337ae701ffb4abf0e398640ad /src/shared/set.h
parentc79bb9e4e2e5b96b2ae2c432bf8b0ff9674fce60 (diff)
Add set_consume which always takes ownership
Freeing in error path is the common pattern with set_put().
Diffstat (limited to 'src/shared/set.h')
-rw-r--r--src/shared/set.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/set.h b/src/shared/set.h
index 8864f7b34e..e5d46e9a8f 100644
--- a/src/shared/set.h
+++ b/src/shared/set.h
@@ -46,6 +46,7 @@ Set* set_copy(Set *s);
int set_ensure_allocated(Set **s, hash_func_t hash_func, compare_func_t compare_func);
int set_put(Set *s, void *value);
+int set_consume(Set *s, void *value);
int set_replace(Set *s, void *value);
void *set_get(Set *s, void *value);
bool set_contains(Set *s, void *value);