summaryrefslogtreecommitdiff
path: root/common/set.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2009-12-13 10:27:33 +0000
committerArthur de Jong <arthur@arthurdejong.org>2009-12-13 10:27:33 +0000
commitef8cc767b201e4798a060282d4a6f280094bb8cc (patch)
tree4f19eae6870321f280959be4b7b24cd0e38d4c2a /common/set.h
parent7dd703c9af5f8b4a50f056c47588a9e51d4ea681 (diff)
change dict and set API to perform loops with a list of strings instead of loop_first() and loop_next() functions
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1028 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'common/set.h')
-rw-r--r--common/set.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/common/set.h b/common/set.h
index e38b52e..111a2cc 100644
--- a/common/set.h
+++ b/common/set.h
@@ -2,7 +2,7 @@
set.h - set functions
This file is part of the nss-pam-ldapd library.
- Copyright (C) 2008 Arthur de Jong
+ Copyright (C) 2008, 2009 Arthur de Jong
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -51,15 +51,9 @@ int set_contains(SET *set,const char *value)
for the set and the values is freed. */
void set_free(SET *set);
-/* Function for looping over all set values.
- This resets the search to the beginning of the set.
- This is required before calling set_loop_next(); */
-void set_loop_first(SET *set);
-
-/* Function for looping over all set values.
- This returns a stored value. NULL is returned when all
- values have been returned. */
-const char *set_loop_next(SET *set)
+/* Return the content of the set as a list of strings.
+ The caller should free the memory with a single call to free(). */
+const char **set_tolist(SET *set)
MUST_USE;
#endif /* _SET_H */