diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-11-20 19:25:51 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-01-14 11:01:58 +0100 |
commit | 3bef3aaec91815b75a78a4c12ca92ac3cec53faf (patch) | |
tree | 2fbba98041b5c3649d7e71f63300bc94c377cb0a /scripts/qapi/visit.py | |
parent | 3e7fb5811baab213dcc7149c3aa69442d683c26c (diff) |
qapi: Simplify QAPISchemaModularCVisitor
Since the previous commit, QAPISchemaVisitor.visit_module() is called
just once. Simplify QAPISchemaModularCVisitor accordingly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191120182551.23795-7-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi/visit.py')
-rw-r--r-- | scripts/qapi/visit.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/qapi/visit.py b/scripts/qapi/visit.py index c72f2bc5c0..4efce62b0c 100644 --- a/scripts/qapi/visit.py +++ b/scripts/qapi/visit.py @@ -285,8 +285,9 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor): def __init__(self, prefix): QAPISchemaModularCVisitor.__init__( self, prefix, 'qapi-visit', ' * Schema-defined QAPI visitors', - __doc__) - self._add_system_module(None, ' * Built-in QAPI visitors') + ' * Built-in QAPI visitors', __doc__) + + def _begin_system_module(self, name): self._genc.preamble_add(mcgen(''' #include "qemu/osdep.h" #include "qapi/error.h" @@ -296,8 +297,7 @@ class QAPISchemaGenVisitVisitor(QAPISchemaModularCVisitor): #include "qapi/visitor.h" #include "qapi/qapi-builtin-types.h" -''', - prefix=prefix)) +''')) def _begin_user_module(self, name): types = self._module_basename('qapi-types', name) |