qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 07/26] qapi-visit: Convert to QAPISchemaVisit


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v8 07/26] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs
Date: Wed, 16 Sep 2015 15:54:59 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Sep 16, 2015 at 01:06:10PM +0200, Markus Armbruster wrote:
> Fixes flat unions to visit the base's base members (the previous
> commit merely added them to the struct).  Same test case.
> 
> Patch's effect on visit_type_UserDefFlatUnion():
> 
>      static void visit_type_UserDefFlatUnion_fields(Visitor *m, 
> UserDefFlatUnion **obj, Error **errp)
>      {
>          Error *err = NULL;
> 
>     +    visit_type_int(m, &(*obj)->integer, "integer", &err);
>     +    if (err) {
>     +        goto out;
>     +    }
>          visit_type_str(m, &(*obj)->string, "string", &err);
>          if (err) {
>              goto out;
> 
> Test cases updated for the bug fix.
> 
> Fixes alternates to generate a visitor for their implicit enumeration
> type.  None of them are currently used, obviously.  Example:
> block-core.json's BlockdevRef now generates
> visit_type_BlockdevRefKind().
> 
> The previous commit's two ugly special cases exist here, too.  Mark
> both TODO.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi-visit.py                   | 270 
> +++++++++++++-------------------
>  tests/qapi-schema/qapi-schema-test.json |   3 -
>  tests/test-qmp-input-strict.c           |   4 +-
>  tests/test-qmp-input-visitor.c          |   4 +-
>  4 files changed, 117 insertions(+), 164 deletions(-)

Reviewed-by: Daniel P. Berrange <address@hidden>


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

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