git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Apr 1, 2010, 20:07 UTC
Message-ID
<a93915db4a7615fe6b4c8e3f890db45f@212.159.54.234>
In-Reply-To
<1270103379-3686-1-git-send-email-bebarino@gmail.com>

On Wed, 31 Mar 2010 23:29:39 -0700, Stephen Boyd <bebarino@gmail.com> wrote:

Show 5 quoted lines
> 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
Previous: Stephen BoydNext: Stephen Boyd
Message 13 of 17 in “fmt-merge-msg improvements”
  1. 0/7 fmt-merge-msg improvementsStephen Boyd, Mar 24, 2010
  2. 1/7 fmt-merge-msg: be quiet if nothing to mergeStephen Boyd, Mar 24, 2010
  3. Junio C HamanoMar 25, 2010
  4. Stephen BoydMar 25, 2010
  5. 2/7 t6200: modernize with test_tickStephen Boyd, Mar 24, 2010
  6. 3/7 t6200: test fmt-merge-msg moreStephen Boyd, Mar 24, 2010
  7. 4/7 fmt-merge-msg: use pretty.c routinesStephen Boyd, Mar 24, 2010
  8. 5/7 string-list: add unsorted_string_list_lookup()Stephen Boyd, Mar 24, 2010
  9. 6/7 fmt-merge-msg: remove custom string_list implementationStephen Boyd, Mar 24, 2010
  10. Junio C HamanoMar 30, 2010
  11. Stephen BoydApr 1, 2010
  12. 8/7 Make string_list_append() consistent with everything elseStephen Boyd, Apr 1, 2010
  13. Julian PhillipsApr 1, 2010
  14. 7/7 fmt-merge-msg: hide summary optionStephen Boyd, Mar 24, 2010
  15. Junio C HamanoMar 25, 2010
  16. Stephen BoydMar 25, 2010
  17. Junio C HamanoMar 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.