From ef42202ac8ed27e7ff1fc90ef8bc2590046dff25 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 22 Apr 2013 23:12:15 -0400 Subject: Add set_consume which always takes ownership Freeing in error path is the common pattern with set_put(). --- src/shared/set.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/shared/set.h') 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); -- cgit v1.2.3-54-g00ecf