Skip to content

Commit

Permalink
Merge branch 'ta/string-list-init'
Browse files Browse the repository at this point in the history
* ta/string-list-init:
  string-list: spell all values out that are given to a string_list initializer
  • Loading branch information
gitster committed Jun 16, 2014
2 parents bbfa0cc + acb3d22 commit c6d3abb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Documentation/technical/api-string-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,5 @@ Represents the list itself.
You should not tamper with it.
. Setting the `strdup_strings` member to 1 will strdup() the strings
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.
4 changes: 2 additions & 2 deletions string-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct string_list {
compare_strings_fn cmp; /* NULL uses strcmp() */
};

#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0 }
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1 }
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0, NULL }
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1, NULL }

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

0 comments on commit c6d3abb

Please sign in to comment.