[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 07/17] qapi: Flat unions with arbitrary discr
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 07/17] qapi: Flat unions with arbitrary discriminator |
Date: |
Fri, 26 Jul 2013 13:36:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 07/26/2013 01:16 PM, Kevin Wolf wrote:
> Instead of the rather verbose syntax that distinguishes base and
> subclass fields...
>
> { "type": "file",
> "read-only": true,
> "data": {
> "filename": "test"
> } }
>
> ...we can now have both in the same namespace, allowing a more direct
> mapping of the command line, and moving fields between the common base
> and subclasses without breaking the API:
>
> { "driver": "file",
> "read-only": true,
> "filename": "test" }
>
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> docs/qapi-code-gen.txt | 22 ++++++++++++
> scripts/qapi-types.py | 11 ++++--
> scripts/qapi-visit.py | 90
> +++++++++++++++++++++++++++++++++++++-------------
> 3 files changed, 98 insertions(+), 25 deletions(-)
>
> v2:
> - make check failed because some of the nested struct code didn't correctly
> put separators between the field names, ending up with foo.barbaz instead
> of foo.bar.baz for fields, and foo_barbar instead of foo_bar_baz for
> functions. Fixed that.
Serves me right for doing just a visual code review instead of 'git am
&& make check'; but now you know why I only gave Reviewed-by instead of
the stronger Acked-by.
At any rate, this version looks better;
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 02/18] qapi-types.py: Implement 'base' for unions, (continued)
- [Qemu-devel] [PATCH 09/18] qapi.py: Maintain a list of union types, Kevin Wolf, 2013/07/23
- [Qemu-devel] [PATCH 08/18] qapi: Add consume argument to qmp_input_get_object(), Kevin Wolf, 2013/07/23
- [Qemu-devel] [PATCH 10/18] qapi: Anonymous unions, Kevin Wolf, 2013/07/23
- [Qemu-devel] [PATCH 11/18] block: Allow "driver" option on the top level, Kevin Wolf, 2013/07/23
- [Qemu-devel] [PATCH 13/18] blockdev: Rename I/O throttling options for QMP, Kevin Wolf, 2013/07/23