From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dziLh-0002mG-24 for qemu-devel@nongnu.org; Wed, 04 Oct 2017 08:00:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dziLa-0005AF-Mc for qemu-devel@nongnu.org; Wed, 04 Oct 2017 08:00:24 -0400 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:45300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dziLa-00059k-F4 for qemu-devel@nongnu.org; Wed, 04 Oct 2017 08:00:18 -0400 Received: by mail-oi0-x22a.google.com with SMTP id f3so19144631oia.2 for ; Wed, 04 Oct 2017 05:00:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20171002152552.27999-17-armbru@redhat.com> References: <20171002152552.27999-1-armbru@redhat.com> <20171002152552.27999-17-armbru@redhat.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 4 Oct 2017 14:00:16 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH 16/32] qapi: Factor out _make_implicit_wrapper_type() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: QEMU , Michael Roth On Mon, Oct 2, 2017 at 5:25 PM, Markus Armbruster wrote= : > Signed-off-by: Markus Armbruster Reviewed-by: Marc-Andr=C3=A9 Lureau > --- > scripts/qapi.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/scripts/qapi.py b/scripts/qapi.py > index 248d650858..4871eb7740 100644 > --- a/scripts/qapi.py > +++ b/scripts/qapi.py > @@ -1552,6 +1552,11 @@ class QAPISchema(object): > members, None)) > return name > > + def _make_implicit_wrapper_type(self, typ, info): > + return self._make_implicit_object_type( > + typ, info, None, 'wrapper', > + [self._make_member('data', typ, info)]) > + > def _def_enum_type(self, expr, info, doc): > name =3D expr['enum'] > data =3D expr['data'] > @@ -1588,8 +1593,7 @@ class QAPISchema(object): > if isinstance(typ, list): > assert len(typ) =3D=3D 1 > typ =3D self._make_array_type(typ[0], info) > - typ =3D self._make_implicit_object_type( > - typ, info, None, 'wrapper', [self._make_member('data', typ, = info)]) > + typ =3D self._make_implicit_wrapper_type(typ, info) > return QAPISchemaObjectTypeVariant(case, typ) > > def _def_union_type(self, expr, info, doc): > -- > 2.13.6 > > --=20 Marc-Andr=C3=A9 Lureau