chiark / gitweb /
set: introduce set_get_strv()
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Oct 2012 02:52:14 +0000 (04:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 19 Oct 2012 02:52:14 +0000 (04:52 +0200)
src/shared/set.c
src/shared/set.h

index 4d56c4f50580547e4337e19ac8499bb670087f29..5f83c50839ae78b831d6f3853eea7ce6c6eb89a4 100644 (file)
@@ -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));
+}
index a6c1d76b0e4cb5c1f17f2fddc7b44f0c6a77fcea..9162e2ae8025699bea4e57edd59ffe39a55f2559 100644 (file)
@@ -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)))