summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-10-19 04:52:14 +0200
committerLennart Poettering <lennart@poettering.net>2012-10-19 04:52:14 +0200
commit9590dfe771d1f499703414c5c5cf21eec7ef69a4 (patch)
treeb945620dd34ec049fa2b4f298ebea033210a8e1f
parent7591abd48079edc1f2adbd922e4b83eb73abeabe (diff)
set: introduce set_get_strv()
-rw-r--r--src/shared/set.c4
-rw-r--r--src/shared/set.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/src/shared/set.c b/src/shared/set.c
index 4d56c4f505..5f83c50839 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 a6c1d76b0e..9162e2ae80 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)))