diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-10 07:17:40 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-09-10 07:27:15 +0200 |
commit | 7669bc3c89898c585a65547b246981ddcd0f49dc (patch) | |
tree | 7ebca4645f19a501e88a4fbee48d8a2e85c63c59 /lib/util/util.h | |
parent | 7c00227f00a83345035c4c0a6716b46864f2da8d (diff) | |
download | samba-7669bc3c89898c585a65547b246981ddcd0f49dc.tar.gz samba-7669bc3c89898c585a65547b246981ddcd0f49dc.tar.bz2 samba-7669bc3c89898c585a65547b246981ddcd0f49dc.zip |
util_strlist: Add some more "const"s
Diffstat (limited to 'lib/util/util.h')
-rw-r--r-- | lib/util/util.h | 13 |
1 files changed, 8 insertions, 5 deletions
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 |