Re: [PATCH v3 2/7] string-list: align string_list_split() with its _in_place() counterpart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> You must know by now that writing "some unknown reason" in a commit
> message is the best way to nerd-snipe me. ;)
>
> It looks like 52acddf36c (string-list: multi-delimiter
> `string_list_split_in_place()`, 2023-04-24) modified the in-place
> variant, but left the original alone. It was needed for the in-place one
> to replace strtok(). Probably the original _should_ have been updated
> then too for consistency, but wasn't. The motivation isn't given there,
> but I'd assume it was some combination of "didn't think of it",
> laziness, and not wanting to update all of the callers.

IOW, it wasn't done for some reason that is still unknown ;-).

> I don't think there's a need to re-roll for this. Mostly I was curious
> and thought I'd share my finding on the list.

Thanks.  IIRC, the multi-delimiter capability was used only in one
unit test or test helper that wanted to split at any whitespace.  As
it did not look so important, I could have unified them in the other
direction to only support a single delimiter (i.e. reverting that
commit you found), but I think the end result of this series would
give us more ergonomic API that we can apply at more places than
before, so I am happy I didn't.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux