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

Re: [PATCH] string_list: Add STRING_LIST_INIT macro and make use of it.

From
Thiago Farina <tfransosi@gmail.com>
Date
Jul 2, 2010, 19:47 UTC
Message-ID
<AANLkTiltCRnezNdL-ueNGfM87mRlbtK6fn1fYMcv5M0G@mail.gmail.com>
In-Reply-To
<20100702193002.GB6585@burratino>
On Fri, Jul 2, 2010 at 4:30 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 11 quoted lines
> Thiago Farina wrote:
>
>> Acked-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Um, I am not so fond of this one.
>
> The argument to STRING_LIST_INIT is hard to interpret without
> familiarity.  What did you think of Peter’s suggestion to use an a
> different macro for the strdup_strings case?  Something like
> STRING_LIST_INIT_DUP_ON_APPEND, but perhaps shorter.
>
If we are fine, would be the following?

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

> It would also be nice to update
> Documentation/technical/api-string-list.txt with whatever you choose.
>
Sure, I will update it.
> That said, I do like the goal of making it easier to reorganize
> struct string_list later if needed.
>
Previous: Jonathan NiederNext: Jonathan Nieder
Message 14 of 21 in “string-list.h: Add STRING_LIST_INIT macro and make use of it.”
  1. string-list.h: Add STRING_LIST_INIT macro and make use of it.Thiago Farina, Jun 26, 2010
  2. Sverre RabbelierJun 26, 2010
  3. Jonathan NiederJun 26, 2010
  4. Thiago FarinaJun 26, 2010
  5. string-list.h: Add STRING_LIST_INIT macro and make use of it.Thiago Farina, Jun 26, 2010
  6. string-list.h: Add STRING_LIST_INIT macro and make use of it.Thiago Farina, Jun 26, 2010
  7. Junio C HamanoJun 27, 2010
  8. Alex RiesenJun 28, 2010
  9. Junio C HamanoJun 29, 2010
  10. Peter KjellerstedtJun 29, 2010
  11. Alex RiesenJun 29, 2010
  12. string_list: Add STRING_LIST_INIT macro and make use of it.Thiago Farina, Jul 2, 2010
  13. Jonathan NiederJul 2, 2010
  14. Thiago FarinaJul 2, 2010
  15. Jonathan NiederJul 2, 2010
  16. string_list: Add STRING_LIST_INIT macro and make use of it.Thiago Farina, Jul 4, 2010
  17. Jonathan NiederJul 7, 2010
  18. Junio C HamanoJul 7, 2010
  19. Thiago FarinaJul 10, 2010
  20. Jonathan NiederJul 10, 2010
  21. Thiago FarinaAug 19, 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.