mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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>
This commit is contained in:
parent
3e7fb5811b
commit
3bef3aaec9
5 changed files with 23 additions and 22 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue