From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnJJp-0007Zh-NZ for qemu-devel@nongnu.org; Mon, 13 Mar 2017 02:19:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnJJl-0003d0-UW for qemu-devel@nongnu.org; Mon, 13 Mar 2017 02:18:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34160) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnJJl-0003a7-K7 for qemu-devel@nongnu.org; Mon, 13 Mar 2017 02:18:53 -0400 From: Markus Armbruster Date: Mon, 13 Mar 2017 07:18:29 +0100 Message-Id: <1489385927-6735-30-git-send-email-armbru@redhat.com> In-Reply-To: <1489385927-6735-1-git-send-email-armbru@redhat.com> References: <1489385927-6735-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, eblake@redhat.com, mdroth@linux.vnet.ibm.com At the protocol level, the distinction between struct, flat union and simple union is meaningless, they are all JSON objects. Document them that way. Example change (qemu-qmp-ref.txt): - -- Simple Union: InputEvent + -- Object: InputEvent Input event union. This also fixes the completely broken headings for flat and simple unions in qemu-qmp-ref.7 and qemu-ga-ref.7, by sidestepping a bug in texi2pod.pl. For instance, it mistranslates "@deftp {Simple Union} InputEvent" to "B (Simple)", but translates "@deftp Object InputEvent" to "B (Object)". Signed-off-by: Markus Armbruster --- scripts/qapi2texi.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py index 282adf4..8eed11a 100755 --- a/scripts/qapi2texi.py +++ b/scripts/qapi2texi.py @@ -219,17 +219,11 @@ class QAPISchemaGenDocVisitor(qapi.QAPISchemaVisitor): def visit_object_type(self, name, info, base, members, variants): doc = self.cur_doc - if not variants: - typ = 'Struct' - elif variants._tag_name: # TODO unclean member access - typ = 'Flat Union' - else: - typ = 'Simple Union' if base and base.is_implicit(): base = None if self.out: self.out += '\n' - self.out += TYPE_FMT(type=typ, + self.out += TYPE_FMT(type='Object', name=doc.symbol, body=texi_entity(doc, 'Members', base, variants)) -- 2.7.4