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 <arm...@redhat.com>
> ---

> +
> +    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 <ebl...@redhat.com>

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