Merge branch 'ta/string-list-init'
* ta/string-list-init: string-list: spell all values out that are given to a string_list initializer
This commit is contained in:
commit
c6d3abbf99
@ -200,3 +200,5 @@ Represents the list itself.
|
|||||||
You should not tamper with it.
|
You should not tamper with it.
|
||||||
. Setting the `strdup_strings` member to 1 will strdup() the strings
|
. Setting the `strdup_strings` member to 1 will strdup() the strings
|
||||||
before adding them, see above.
|
before adding them, see above.
|
||||||
|
. The `compare_strings_fn` member is used to specify a custom compare
|
||||||
|
function, otherwise `strcmp()` is used as the default function.
|
||||||
|
@ -15,8 +15,8 @@ struct string_list {
|
|||||||
compare_strings_fn cmp; /* NULL uses strcmp() */
|
compare_strings_fn cmp; /* NULL uses strcmp() */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0 }
|
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0, NULL }
|
||||||
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1 }
|
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1, NULL }
|
||||||
|
|
||||||
void print_string_list(const struct string_list *p, const char *text);
|
void print_string_list(const struct string_list *p, const char *text);
|
||||||
void string_list_clear(struct string_list *list, int free_util);
|
void string_list_clear(struct string_list *list, int free_util);
|
||||||
|
Loading…
Reference in New Issue
Block a user