Skip to content

Commit c6d3abb

Browse files
committed
Merge branch 'ta/string-list-init'
* ta/string-list-init: string-list: spell all values out that are given to a string_list initializer
2 parents bbfa0cc + acb3d22 commit c6d3abb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Documentation/technical/api-string-list.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,5 @@ Represents the list itself.
200200
You should not tamper with it.
201201
. Setting the `strdup_strings` member to 1 will strdup() the strings
202202
before adding them, see above.
203+
. The `compare_strings_fn` member is used to specify a custom compare
204+
function, otherwise `strcmp()` is used as the default function.

string-list.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ struct string_list {
1515
compare_strings_fn cmp; /* NULL uses strcmp() */
1616
};
1717

18-
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0 }
19-
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1 }
18+
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0, NULL }
19+
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1, NULL }
2020

2121
void print_string_list(const struct string_list *p, const char *text);
2222
void string_list_clear(struct string_list *list, int free_util);

0 commit comments

Comments
 (0)