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. >