diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-06-13 11:58:00 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-06-13 11:58:00 +0100 |
commit | 4747524f9f243ca5ff1f146d37e423c00e923ee1 (patch) | |
tree | 487c935041a08eba8a83c3399ca6a9aacfc6c1fe /scripts/qapi/introspect.py | |
parent | 8e23e34d989d5ce542fa26425f091fc61e1f23f4 (diff) | |
parent | 157dd363955b961ef378eb1f7817c31a7fa94d10 (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-06-12' into staging
QAPI patches for 2019-06-12
# gpg: Signature made Wed 12 Jun 2019 17:44:50 BST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2019-06-12:
qapi: Simplify how QAPIDoc implements its state machine
file-posix: Add dynamic-auto-read-only QAPI feature
qapi: Allow documentation for features
qapi: Disentangle QAPIDoc code
tests/qapi-schema: Error case tests for features in structs
tests/qapi-schema: Test for good feature lists in structs
qapi: Add feature flags to struct types
block/gluster: update .help of BLOCK_OPT_PREALLOC option
block/file-posix: update .help of BLOCK_OPT_PREALLOC option
qapi/block-core: update documentation of preallocation parameter
qdev: Delete unused LostTickPolicy "merge"
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/qapi/introspect.py')
-rw-r--r-- | scripts/qapi/introspect.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index f7f2ca07e4..f62cf0a2e1 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -188,11 +188,15 @@ const QLitObject %(c_name)s = %(c_string)s; self._gen_qlit('[' + element + ']', 'array', {'element-type': element}, ifcond) - def visit_object_type_flat(self, name, info, ifcond, members, variants): + def visit_object_type_flat(self, name, info, ifcond, members, variants, + features): obj = {'members': [self._gen_member(m) for m in members]} if variants: obj.update(self._gen_variants(variants.tag_member.name, variants.variants)) + if features: + obj['features'] = [(f.name, {'if': f.ifcond}) for f in features] + self._gen_qlit(name, 'object', obj, ifcond) def visit_alternate_type(self, name, info, ifcond, variants): |