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

Re: [Patch v3] string-list: Document STRING_LIST_INIT_* macros.

From
Thiago Farina <tfransosi@gmail.com>
Date
Sep 6, 2010, 00:38 UTC
Message-ID
<AANLkTikivCxU8Si-p1u4H6GtQfrdQdrHcBpr0Smkf5Rq@mail.gmail.com>
In-Reply-To
<20100906002249.GB18060@burratino>
On Sun, Sep 5, 2010 at 9:22 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 15 quoted lines
>> @@ -34,10 +39,9 @@ member (you need this if you add things later) and you should set the
>>  Example:
>>
>>  ----
>> -struct string_list list;
>> +struct string_list list = STRING_LIST_DUP;
>>  int i;
>>
>> -memset(&list, 0, sizeof(struct string_list));
>>  string_list_append(&list, "foo");
>>  string_list_append(&list, "bar");
>>  for (i = 0; i < list.nr; i++)
>
> Probably worth copying and pasting this code to another file and
> trying it to make sure it works for the final draft.
I already done in the test-string-list.c patch I sent. :-)
Previous: Jonathan Nieder
Message 3 of 3 in “string-list: Document STRING_LIST_INIT_* macros.”
  1. string-list: Document STRING_LIST_INIT_* macros.Thiago Farina, Sep 6, 2010
  2. Jonathan NiederSep 6, 2010
  3. Thiago FarinaSep 6, 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.