qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisit


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions
Date: Wed, 16 Sep 2015 11:09:04 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/16/2015 05:06 AM, Markus Armbruster wrote:
> Fixes flat unions to get the base's base members.  Test case is from
> commit 2fc0043, in qapi-schema-test.json:
> 

> 
> Flat union visitors remain broken.  They'll be fixed next.
> 
> Two ugly special cases for simple unions now stand out like sore
> thumbs:
> 
> 1. The type tag is named 'type' everywhere, except in generated C,
>    where it's 'kind'.
> 
> 2. QAPISchema lowers simple unions to semantically equivalent flat
>    unions.  However, the C generated for a simple unions differs from
>    the C generated for its equivalent flat union, and we therefore
>    need special code to preserve that pointless difference for now.
> 
> Mark both TODO.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---

> +
> +    def visit_enum_type(self, name, info, values, prefix):
> +        self._fwdecl += generate_enum(name, values, prefix)
> +        self._fwdefn += generate_enum_lookup(name, values, prefix)

straightforward.

Reviewed-by: Eric Blake <address@hidden>

-- 
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]