Re: [PATCH v2 1/6] string-list: introduce `string_list_split_in_place_multi()`t
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Apr 23, 2023, 02:40 UTC
- Message-ID
- <ZESaryIvTOPiKWZK@nand.local>
- In-Reply-To
- <ZESaFXMcP6mhtBOv@nand.local>
On Sat, Apr 22, 2023 at 10:38:13PM -0400, Taylor Blau wrote:
Show 11 quoted lines
> > Obviously one solution is to add the "runs" option to all variants. But > > I'd be hesitant to burden existing callers. So I'd propose one of: > > > > 1. Make your _1() function public, with a name like _with_options() or > > something (though the function name is sadly already quite long). > > Leave string_list_split_in_place() as a wrapper that behaves as > > now, and have the few new callers use the with_options() variant. > > I think that in general I'd prefer (2) to avoid polluting the list of > declarations in string-list.h, but in this case I think that in this > case it is the right thing to do.
Oh, nevermind. I just read René's solution below and it is much cleaner. I take it back ;-).
Thanks, Taylor