Thread (8 messages) flat view 8 messages, 3 authors, 2018-05-21

Re: Re*: [PATCH v4 3/4] string-list: provide `string_list_appendf()`

From: Jeff King <hidden>
Date: 2018-05-21 02:39:18

Possibly related (same subject, not in this thread)

On Mon, May 21, 2018 at 09:25:01AM +0900, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
I have a feeling that argv_array might be a better fit for the
purpose of keeping track of to_free[] strings in the context of this
series.  Moving away from string_list would allow us to sidestep the
storage ownership issues the API has, and we do not need the .util
thing string_list gives us (which is one distinct advantage string_list
has over argv_array, if the application needs that feature).

We would need to make _pushf() and friends return "const char *" if
we go that route to make the resulting API more useful, though.
... and redoing the 4/4 patch using argv_array_pushf() makes the
result look like this, which does not look too bad.
Agreed.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help