[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types |
Date: |
Mon, 13 Mar 2017 07:18:29 +0100 |
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<Union> (Simple)", but translates "@deftp Object
InputEvent" to "B<SocketAddress> (Object)".
Signed-off-by: Markus Armbruster <address@hidden>
---
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
- [Qemu-devel] [PATCH for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members, (continued)
- [Qemu-devel] [PATCH for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 18/47] qapi: Use raw strings for regular expressions consistently, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 23/47] qapi2texi: Don't hide undocumented members and arguments, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 28/47] qapi2texi: Generate descriptions for simple union tags, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 39/47] qapi: Drop unused variable events, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types,
Markus Armbruster <=
- [Qemu-devel] [PATCH for-2.9 21/47] qapi2texi: Present the table of members more clearly, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 11/47] qapi: Avoid unwanted blank lines in QAPIDoc, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 05/47] qapi: Have each QAPI schema declare its returns white-list, Markus Armbruster, 2017/03/13
- [Qemu-devel] [PATCH for-2.9 24/47] qapi2texi: Implement boxed argument documentation, Markus Armbruster, 2017/03/13