[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V2 0/4] string list functions
From: |
Steven Sistare |
Subject: |
Re: [PATCH V2 0/4] string list functions |
Date: |
Thu, 9 Feb 2023 09:42:19 -0500 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
On 2/9/2023 5:48 AM, Daniel P. Berrangé wrote:
> On Tue, Feb 07, 2023 at 10:48:43AM -0800, Steve Sistare wrote:
>> Add some handy string list functions, for general use now, and for
>> eventual use in the cpr/live update patches.
>>
>> Steve Sistare (4):
>> qapi: strList_from_string
>> qapi: QAPI_LIST_LENGTH
>> qapi: strv_from_strList
>> qapi: strList unit tests
>
> I know that the 'strList' type falls out naturally from the
> QAPI type generator for arrays, but I've always considered
> it to be a rather awkward result. The normal C approach
> would be to use 'char **' NULL terminated, which conveniently
> already has a bunch of helper APIs from glib, and is also
> accepted or returned by various other functions we might
> like to use.
>
> Should we consider making the QAPI generator handle string
> lists as a special case, emitting 'char **' instead of this
> series ?
>
> With regards,
> Daniel
That is an intellectually appealing idea, but it sounds like a disproportionate
effort to handle this small use case. It would also make string list handling
be different than the other qapi lists: boolList, sizeList, uint64List, etc.
- Steve
- Re: [PATCH V2 1/4] qapi: strList_from_string, (continued)
[PATCH V2 3/4] qapi: strv_from_strList, Steve Sistare, 2023/02/07
[PATCH V2 4/4] qapi: strList unit tests, Steve Sistare, 2023/02/07
[PATCH V2 2/4] qapi: QAPI_LIST_LENGTH, Steve Sistare, 2023/02/07
Re: [PATCH V2 0/4] string list functions, Markus Armbruster, 2023/02/09
Re: [PATCH V2 0/4] string list functions, Daniel P . Berrangé, 2023/02/09