diff options
author | Markus Armbruster <armbru@redhat.com> | 2024-03-15 16:28:22 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2024-05-06 12:38:27 +0200 |
commit | d1da8af897340ed3773c09add93c3b9f494f2c2b (patch) | |
tree | a406d5651347b7a14d7c3aec2be2a0b791124377 /scripts/qapi/types.py | |
parent | 1d067e3953e76af28ba20c995b176fcbcb7a10aa (diff) | |
download | qemu-d1da8af897340ed3773c09add93c3b9f494f2c2b.zip qemu-d1da8af897340ed3773c09add93c3b9f494f2c2b.tar.gz qemu-d1da8af897340ed3773c09add93c3b9f494f2c2b.tar.bz2 |
qapi: Rename visitor parameter @variants to @branches
The previous commit narrowed the type of .visit_object_type()
parameter @variants from QAPISchemaVariants to QAPISchemaBranches.
Rename it to @branches.
Same for .visit_object_type_flat().
A few of these pass @branches to helper functions:
QAPISchemaGenRSTVisitor.visit_object_type() to ._nodes_for_members()
and ._nodes_for_variant_when(), and
QAPISchemaGenVisitVisitor.visit_object_type() to
gen_visit_object_members(). Rename the helpers' @variants parameters
to @branches as well.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi/types.py')
-rw-r--r-- | scripts/qapi/types.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/types.py b/scripts/qapi/types.py index 23cdf3e..0abb78f 100644 --- a/scripts/qapi/types.py +++ b/scripts/qapi/types.py @@ -350,13 +350,13 @@ class QAPISchemaGenTypeVisitor(QAPISchemaModularCVisitor): features: List[QAPISchemaFeature], base: Optional[QAPISchemaObjectType], members: List[QAPISchemaObjectTypeMember], - variants: Optional[QAPISchemaBranches]) -> None: + branches: Optional[QAPISchemaBranches]) -> None: # Nothing to do for the special empty builtin if name == 'q_empty': return with ifcontext(ifcond, self._genh): self._genh.preamble_add(gen_fwd_object_or_array(name)) - self._genh.add(gen_object(name, ifcond, base, members, variants)) + self._genh.add(gen_object(name, ifcond, base, members, branches)) with ifcontext(ifcond, self._genh, self._genc): if base and not base.is_implicit(): self._genh.add(gen_upcast(name, base)) |