From 7669bc3c89898c585a65547b246981ddcd0f49dc Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 10 Sep 2009 07:17:40 +0200 Subject: util_strlist: Add some more "const"s --- lib/util/util.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'lib/util/util.h') diff --git a/lib/util/util.h b/lib/util/util.h index aa9f91ef96..c0e87a2705 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -409,19 +409,21 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2); /** build an empty (only NULL terminated) list of strings (for expansion with str_list_add() etc) */ -_PUBLIC_ char **str_list_make_empty(TALLOC_CTX *mem_ctx); +_PUBLIC_ const char **str_list_make_empty(TALLOC_CTX *mem_ctx); /** place the only element 'entry' into a new, NULL terminated string list */ -_PUBLIC_ char **str_list_make_single(TALLOC_CTX *mem_ctx, const char *entry); +_PUBLIC_ const char **str_list_make_single(TALLOC_CTX *mem_ctx, + const char *entry); /** build a null terminated list of strings from a input string and a separator list. The separator list must contain characters less than or equal to 0x2f for this to work correctly on multi-byte strings */ -_PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const char *sep); +_PUBLIC_ const char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, + const char *sep); /** * build a null terminated list of strings from an argv-like input string @@ -447,7 +449,7 @@ _PUBLIC_ size_t str_list_length(const char * const *list); /** copy a string list */ -_PUBLIC_ char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list); +_PUBLIC_ const char **str_list_copy(TALLOC_CTX *mem_ctx, const char **list); /** Return true if all the elements of the list match exactly. @@ -476,7 +478,8 @@ _PUBLIC_ bool str_list_check_ci(const char **list, const char *s); /** append one list to another - expanding list1 */ -_PUBLIC_ char **str_list_append(const char **list1, const char * const *list2); +_PUBLIC_ const char **str_list_append(const char **list1, + const char * const *list2); /** remove duplicate elements from a list -- cgit