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

Re: [demo/patch 0/3] Re: [PATCH] Documentation: document the string-list macros.

From
Thiago Farina <tfransosi@gmail.com>
Date
Sep 5, 2010, 23:19 UTC
Message-ID
<AANLkTinP1XNsVCnyL+dnn_+up1Oi6aSxiaA_JjdKDGje@mail.gmail.com>
In-Reply-To
<20100905200323.GA14497@burratino>
On Sun, Sep 5, 2010 at 5:03 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 26 quoted lines
> Thiago Farina wrote:
>
>> --- a/Documentation/technical/api-string-list.txt
>> +++ b/Documentation/technical/api-string-list.txt
>> @@ -52,6 +52,18 @@ However, if you use the list to check if a certain string was added
>>  already, you should not do that (using unsorted_string_list_has_string()),
>>  because the complexity would be quadratic again (but with a worse factor).
>>
>> +Macros
>> +------
>> +
>> +`STRING_LIST_INIT_NODUP`::
>> +
>> +     Initialize the members and set the `strdup_strings` member to 0.
>> +
>> +`STRING_LIST_INIT_DUP`::
>> +
>> +     Initialize the members and set the `strdup_strings` member to 1.
>
> After reading that, one might be tempted to write
>
>        struct string_list x;
>        STRING_LIST_INIT_NODUP(x);
>
> , no?  In other words, I don't find the text very clear.
>
Yeah, you are right.
> If you like working by example (like I do) then api-strbuf.txt might
> give a good indication of how this sort of thing can be helpfully
> documented.
>
I have looked into it :-)
> Maybe something in this direction?
>
> Patch #3 in particular is very rough
Oh yeah :)
>  This is not meant for application, just to give an
> idea.
>
I like the idea. I will improve the Documentation based on or version.
Thanks.
Previous: Jonathan Nieder
Message 6 of 6 in “Documentation: document the string-list macros.”
  1. Documentation: document the string-list macros.Thiago Farina, Sep 5, 2010
  2. 0/3 Re: [PATCH] Documentation: document the string-list macros.Jonathan Nieder, Sep 5, 2010
  3. 1/3 string-list: introduce string_list_init()Jonathan Nieder, Sep 5, 2010
  4. 1/3 string-list: Document STRING_LIST_INIT_* and string_list_init()Jonathan Nieder, Sep 5, 2010
  5. 3/3 Make initialization of string_lists more consistentJonathan Nieder, Sep 5, 2010
  6. Thiago FarinaSep 5, 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.