[PATCH 1/1] RFC: git: update to v2.41.0-rc2

Christian Hesse list at eworm.de
Fri May 26 14:21:13 UTC 2023


"Jason A. Donenfeld" <Jason at zx2c4.com> on Fri, 2023/05/26 16:18:
> On Fri, May 26, 2023 at 4:17 PM Christian Hesse <list at eworm.de> wrote:
> >
> > Christian Hesse <list at eworm.de> on Fri, 2023/05/26 16:06:  
> > > > Like string_list_split(), except that string is split in-place: the
> > > > delimiter characters in string are overwritten with NULs, and the
> > > > new string_list_items point into string (which therefore must not
> > > > be modified or freed while the string_list is in use).
> > > > list->strdup_strings must *not* be set.  
> > >
> > > So we should be fine with the change, no?  
> >
> > Ah, the strings are not allocated, but we should run:
> >
> > string_list_clear(&list, 0);
> >
> > Is it fine then?  
> 
> Right. My understanding is that while the strings themselves are not
> allocated, the array of string list items still is.

Probably. But is there a better alternative now that `strtok_r()`  is banned?
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20230526/d59ab549/attachment.sig>


More information about the CGit mailing list