diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:38 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-30 11:55:38 -0700 |
commit | a53deac89eb6c65cd953c730f33b86ac3f72d647 (patch) | |
tree | 69394607c1f6b8a0c5c53207a747fe31d79f0c79 /string-list.h | |
parent | 6296062285e07051a5a46cbbd74c67a10bf2ac16 (diff) | |
parent | 1d2f80fa79cdc6f7f4fa1cefb47d7d19be3bc5ee (diff) | |
download | git-a53deac89eb6c65cd953c730f33b86ac3f72d647.tar.gz git-a53deac89eb6c65cd953c730f33b86ac3f72d647.tar.xz |
Merge branch 'jp/string-list-api-cleanup'
* jp/string-list-api-cleanup:
string_list: Fix argument order for string_list_append
string_list: Fix argument order for string_list_lookup
string_list: Fix argument order for string_list_insert_at_index
string_list: Fix argument order for string_list_insert
string_list: Fix argument order for for_each_string_list
string_list: Fix argument order for print_string_list
Diffstat (limited to 'string-list.h')
-rw-r--r-- | string-list.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/string-list.h b/string-list.h index 63b69c8d7..680d600d1 100644 --- a/string-list.h +++ b/string-list.h @@ -12,7 +12,7 @@ struct string_list unsigned int strdup_strings:1; }; -void print_string_list(const char *text, const struct string_list *p); +void print_string_list(const struct string_list *p, const char *text); void string_list_clear(struct string_list *list, int free_util); /* Use this function to call a custom clear function on each util pointer */ @@ -22,20 +22,20 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c /* Use this function to iterate over each item */ typedef int (*string_list_each_func_t)(struct string_list_item *, void *); -int for_each_string_list(string_list_each_func_t, - struct string_list *list, void *cb_data); +int for_each_string_list(struct string_list *list, + string_list_each_func_t, void *cb_data); /* Use these functions only on sorted lists: */ int string_list_has_string(const struct string_list *list, const char *string); int string_list_find_insert_index(const struct string_list *list, const char *string, int negative_existing_index); -struct string_list_item *string_list_insert(const char *string, struct string_list *list); -struct string_list_item *string_list_insert_at_index(int insert_at, - const char *string, struct string_list *list); -struct string_list_item *string_list_lookup(const char *string, struct string_list *list); +struct string_list_item *string_list_insert(struct string_list *list, const char *string); +struct string_list_item *string_list_insert_at_index(struct string_list *list, + int insert_at, const char *string); +struct string_list_item *string_list_lookup(struct string_list *list, const char *string); /* Use these functions only on unsorted lists: */ -struct string_list_item *string_list_append(const char *string, struct string_list *list); +struct string_list_item *string_list_append(struct string_list *list, const char *string); void sort_string_list(struct string_list *list); int unsorted_string_list_has_string(struct string_list *list, const char *string); struct string_list_item *unsorted_string_list_lookup(struct string_list *list, |