qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v2 19/47] qapi: Generated code cleanup


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC v2 19/47] qapi: Generated code cleanup
Date: Tue, 4 Aug 2015 06:31:06 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/04/2015 03:08 AM, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
> 
>> Eric Blake <address@hidden> writes:
>>
>>> On 07/01/2015 02:22 PM, Markus Armbruster wrote:
> [...]
>>>> @@ -105,7 +103,8 @@ struct %(name)s
>>>>  
>>>>  def generate_enum_lookup(name, values):
>>>>      ret = mcgen('''
>>>> -const char * const %(name)s_lookup[] = {
>>>> +
>>>> +const char *const %(name)s_lookup[] = {
>>>
>>> [2] generated diffs like this:
>>>
>>> qapi-types.c:
>>> -const char * const OnOffAuto_lookup[] = {
>>> +const char *const OnOffAuto_lookup[] = {
>>>
>>> Hmm - we already failed to update docs/qapi-code-gen.txt in the past; we
>>> added a const in commit 2e4450ff that is missing from the documentation.
>>
>> Minor review fail.  Not the first time.
> 
> I take that back, it's actually not visible in qapi-code-gen.txt.

Oh, you're right - the only mention of *_lookup[] in the docs file is
the array generated for all events, and that one was output with correct
spacing (until the rest of your series fixes it to share code rather
than duplicate things with slight differences).

Maybe we SHOULD be showing what the generators do for enums, unions, and
alternates (by expanding the example-schema.json that is then fed to all
the example script usage). But that's fine as a project for another day.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]