Thread (12 messages) flat view 12 messages, 3 authors, 2016-06-15

Re: [PATCH 8/7] Make string_list_append() consistent with everything else

From: Julian Phillips <hidden>
Date: 2016-06-15 22:48:32

On Wed, 31 Mar 2010 23:29:39 -0700, Stephen Boyd [off-list ref]
wrote:
string_list_append() is the only function in the string_list API which
takes
the struct string_list as the second argument instead of the first. Swap
the
ordering to make the string_list API consistent.
The only function?  It doesn't seem that way ...

jp3@rayne: git(pu)>grep '(' string-list.h | grep -v '(\(const \)*struct
string_list'
void print_string_list(const char *text, const struct string_list *p);
typedef void (*string_list_clear_func_t)(void *p, const char *str);
int for_each_string_list(string_list_each_func_t,
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,
struct string_list_item *string_list_lookup(const char *string, struct
string_list *list);
struct string_list_item *string_list_append(const char *string, struct
string_list *list);

I don't think that swapping the argument order for append is wrong, but it
doesn't seem to be the only function that doesn't take the list as the
first argument ... or am I missing something? (probably am)

-- 
Julian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help