[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 35/50] qapi2texi: add condition to variants
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v3 35/50] qapi2texi: add condition to variants |
Date: |
Mon, 11 Sep 2017 13:06:08 +0200 |
Signed-off-by: Marc-André Lureau <address@hidden>
---
scripts/qapi2texi.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py
index bb819856ef..4e7b1cda87 100755
--- a/scripts/qapi2texi.py
+++ b/scripts/qapi2texi.py
@@ -163,8 +163,9 @@ def texi_members(doc, what, base, variants, member_func):
items += '@item The members of @code{%s}\n' % base.doc_type()
if variants:
for v in variants.variants:
- when = ' when @code{%s} is @t{"%s"}' % (
- variants.tag_member.name, v.name)
+ when = ' when @code{%s} is @t{"%s"}%s' % (
+ variants.tag_member.name, v.name,
+ ' (and @code{%s})' % v.ifcond if v.ifcond else '')
if v.type.is_implicit():
assert not v.type.base and not v.type.variants
for m in v.type.local_members:
--
2.14.1.146.gd35faa819
- [Qemu-devel] [PATCH v3 25/50] qapi: add #if conditions to generated struct members, (continued)
- [Qemu-devel] [PATCH v3 25/50] qapi: add #if conditions to generated struct members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 27/50] qapi: add #if conditions to generated variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 26/50] qapi: add 'if' on union variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 28/50] qapi: add 'if' to alternate variant, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 30/50] qapi: add #if conditions to generated alternate variants, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 29/50] qapi: add tests for invalid alternate, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 32/50] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 31/50] docs: document schema configuration, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 33/50] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 34/50] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 35/50] qapi2texi: add condition to variants,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v3 36/50] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 37/50] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 38/50] qapi: add conditions to REPLICATION type/commands on the schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 39/50] qapi-commands: don't initialize command list in qmp_init_marshall(), Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 41/50] qapi: add a 'unit' pragma, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 40/50] qapi: add -i/--include filename.h, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 42/50] qapi: add a -u/--unit option to specify which unit to visit, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 44/50] build-sys: add a target schema, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 43/50] build-sys: move qmp-introspect per target, Marc-André Lureau, 2017/09/11
- [Qemu-devel] [PATCH v3 45/50] qapi: make rtc-reset-reinjection depend on TARGET_I386, Marc-André Lureau, 2017/09/11