From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcE74-0000zi-Ul for qemu-devel@nongnu.org; Wed, 16 Sep 2015 10:55:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcE6y-0000Sb-HP for qemu-devel@nongnu.org; Wed, 16 Sep 2015 10:55:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcE6y-0000Rs-DC for qemu-devel@nongnu.org; Wed, 16 Sep 2015 10:55:04 -0400 Date: Wed, 16 Sep 2015 15:54:59 +0100 From: "Daniel P. Berrange" Message-ID: <20150916145459.GL21184@redhat.com> References: <1442401589-24189-1-git-send-email-armbru@redhat.com> <1442401589-24189-8-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1442401589-24189-8-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH v8 07/26] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com 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 > --- > 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 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 :|