diff options
author | John Snow <jsnow@redhat.com> | 2025-03-10 23:42:31 -0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2025-03-11 10:10:57 +0100 |
commit | 323c668934a650673548088c6718c633b57b6ce5 (patch) | |
tree | accb00ff7148774d1ba60c0d2283a893ccd97229 /rust | |
parent | faeacf858bd9529cab10a13ff9d2137c8f2ae17c (diff) | |
download | qemu-323c668934a650673548088c6718c633b57b6ce5.zip qemu-323c668934a650673548088c6718c633b57b6ce5.tar.gz qemu-323c668934a650673548088c6718c633b57b6ce5.tar.bz2 |
qapi: clean up encoding of section kinds
We have several kinds of sections, and to tell them apart, we use
Section attribute @tag and also the section object's Python type:
type @tag
untagged Section None
@foo: ArgSection 'foo'
Returns: Section 'Returns'
Errors: Section 'Errors'
Since: Section 'Since'
TODO: Section 'TODO'
Note:
* @foo can be a member or a feature description, depending on context.
* tag == 'Since' can be a Since: section or a member or feature
description. If it's a Section, it's the former, and if it's an
ArgSection, it's the latter.
Clean this up as follows. Move the member or feature name to new
ArgSection attribute @name, and replace @tag by enum @kind like this:
type kind name
untagged Section PLAIN
@foo: ArgSection MEMBER 'foo' if member or argument
ArgSection FEATURE 'foo' if feature
Returns: Section RETURNS
Errors: Section ERRORS
Since: Section SINCE
TODO: Section TODO
The qapi-schema tests are updated to account for the new section names;
"TODO" becomes "Todo" and `None` becomes "Plain" there.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-ID: <20250311034303.75779-34-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'rust')
0 files changed, 0 insertions, 0 deletions