From: Lennart Poettering Date: Fri, 19 Oct 2012 02:52:14 +0000 (+0200) Subject: set: introduce set_get_strv() X-Git-Tag: v195~42 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=9590dfe771d1f499703414c5c5cf21eec7ef69a4 set: introduce set_get_strv() --- diff --git a/src/shared/set.c b/src/shared/set.c index 4d56c4f50..5f83c5083 100644 --- a/src/shared/set.c +++ b/src/shared/set.c @@ -124,3 +124,7 @@ void set_clear(Set *s) { void set_clear_free(Set *s) { hashmap_clear_free(MAKE_HASHMAP(s)); } + +char **set_get_strv(Set *s) { + return hashmap_get_strv(MAKE_HASHMAP(s)); +} diff --git a/src/shared/set.h b/src/shared/set.h index a6c1d76b0..9162e2ae8 100644 --- a/src/shared/set.h +++ b/src/shared/set.h @@ -62,6 +62,8 @@ void *set_steal_first(Set *s); void* set_first(Set *s); void* set_last(Set *s); +char **set_get_strv(Set *s); + #define SET_FOREACH(e, s, i) \ for ((i) = ITERATOR_FIRST, (e) = set_iterate((s), &(i)); (e); (e) = set_iterate((s), &(i)))