diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-25 09:15:39 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-12-01 16:46:29 +1100 |
commit | 012494b8005b621642ec98d51d067378f8e10421 (patch) | |
tree | 97a00031853936e2bc87142e321815d0bc642f13 /lib | |
parent | 9ce7e9ab8401e038b36d53e477fcb658d1c54f80 (diff) | |
download | samba-012494b8005b621642ec98d51d067378f8e10421.tar.gz samba-012494b8005b621642ec98d51d067378f8e10421.tar.bz2 samba-012494b8005b621642ec98d51d067378f8e10421.zip |
util/util_strlist - add a call "const_str_list" for making "unconst" lists "const"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util/util.h | 5 | ||||
-rw-r--r-- | lib/util/util_strlist.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h index e7ea0ba527..729190af63 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -535,6 +535,11 @@ _PUBLIC_ const char **str_list_add_const(const char **list, const char *s); _PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx, const char **list); +/** + * Needed for making an "unconst" list "const" + */ +_PUBLIC_ const char **const_str_list(char **list); + /* The following definitions come from lib/util/util_file.c */ diff --git a/lib/util/util_strlist.c b/lib/util/util_strlist.c index 71998b9a5c..6d1a695987 100644 --- a/lib/util/util_strlist.c +++ b/lib/util/util_strlist.c @@ -486,3 +486,12 @@ _PUBLIC_ const char **str_list_copy_const(TALLOC_CTX *mem_ctx, ret[i] = NULL; return ret; } + +/** + * Needed for making an "unconst" list "const" + */ +_PUBLIC_ const char **const_str_list(char **list) +{ + return (const char **)list; +} + |