[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs
Date: Mon, 30 Mar 2015 22:30:26 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/29/2015 10:03 AM, Markus Armbruster wrote:
> What happens when I define a member key multiple times in a struct or
> union type?
> If I do it directly, the parser rejects the duplicate key in
> get_members().  Covered by tests/qapi-schema/duplicate-key.json.
> What if I hide the duplicate in a base type?
> If I stick this into qapi-schema-test.json:
>     { 'type': 'Base', 'data': { 'foo': 'str', 'bar': 'str' } }
>     { 'type': 'Clash', 'base': 'Base', 'data': { 'foo': 'int' } }
>     { 'command': 'clash', 'data': 'Clash' }
> the resulting test-qmp-commands.h declares qmp_clash(), but
> test-qmp-marshal.c doesn't define it.  WTF?!?

Nice test; I'll see if I can add a patch on to the end of the series to
flag it.  I suspect flat unions have potential for the same issue.

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]