util/util_strlist - add a call "const_str_list" for making "unconst" lists "const"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 25 Nov 2009 08:15:39 +0000 (09:15 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 1 Dec 2009 05:46:29 +0000 (16:46 +1100)
lib/util/util.h
lib/util/util_strlist.c

index e7ea0ba5270c9c27496eed6d025f8898ae493bba..729190af6333f589a2e93d3b7ef7684ac93e8e25 100644 (file)
@@ -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  */
 
index 71998b9a5c4110dd157401a8eefd67e18df6dd0e..6d1a695987160b2bcb744579362b54270600ff99 100644 (file)
@@ -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;
+}
+