From 2467ae1b6ad3600eeed5223df672111d9ac3f3db Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 3 May 2009 13:08:46 +0200 Subject: Clean up after Tridge's util_strlist changes --- lib/util/util.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/util/util.h') diff --git a/lib/util/util.h b/lib/util/util.h index 81c7edfbdf..f4c2b833af 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -422,7 +422,7 @@ _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char /** return the number of elements in a string list */ -_PUBLIC_ size_t str_list_length(const char **list); +_PUBLIC_ size_t str_list_length(const char * const *list); /** copy a string list @@ -437,7 +437,7 @@ _PUBLIC_ bool str_list_equal(const char **list1, const char **list2); /** add an entry to a string list */ -_PUBLIC_ char **str_list_add(char **list, const char *s); +_PUBLIC_ const char **str_list_add(const char **list, const char *s); /** remove an entry from a string list @@ -456,12 +456,12 @@ _PUBLIC_ bool str_list_check_ci(const char **list, const char *s); /** append one list to another - expanding list1 */ -_PUBLIC_ char **str_list_append(char **list1, const char **list2); +_PUBLIC_ char **str_list_append(const char **list1, const char * const *list2); /** remove duplicate elements from a list */ -_PUBLIC_ char **str_list_unique(char **list); +_PUBLIC_ const char **str_list_unique(const char **list); /* very useful when debugging complex list related code @@ -473,19 +473,21 @@ _PUBLIC_ void str_list_show(const char **list); append one list to another - expanding list1 this assumes the elements of list2 are const pointers, so we can re-use them */ -_PUBLIC_ char **str_list_append_const(char **list1, const char **list2); +_PUBLIC_ const char **str_list_append_const(const char **list1, + const char **list2); /** add an entry to a string list this assumes s will not change */ -_PUBLIC_ char **str_list_add_const(char **list, const char *s); +_PUBLIC_ const char **str_list_add_const(const char **list, const char *s); /** copy a string list this assumes list will not change */ -_PUBLIC_ char **str_list_copy_const(TALLOC_CTX *mem_ctx, const char **list); +_PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx, + const char **list); /* The following definitions come from lib/util/util_file.c */ -- cgit