From patchwork Mon Mar 13 06:18:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 737987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vhSZs54RNz9s78 for ; Mon, 13 Mar 2017 17:27:17 +1100 (AEDT) Received: from localhost ([::1]:50393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnJRr-0005UA-3h for incoming@patchwork.ozlabs.org; Mon, 13 Mar 2017 02:27:15 -0400 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 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0C4E3DBCC; Mon, 13 Mar 2017 06:18:53 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2D6Iqro023396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 13 Mar 2017 02:18:53 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 73ADB11384B3; Mon, 13 Mar 2017 07:18:47 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 13 Mar 2017 06:18:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, mdroth@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Eric Blake --- 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))