qapi/common: Eliminate QAPISchema.exprs
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20180211093607.27351-13-armbru@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
af97502ce9
commit
71a7510baf
@ -1461,13 +1461,13 @@ class QAPISchema(object):
|
||||
def __init__(self, fname):
|
||||
try:
|
||||
parser = QAPISchemaParser(open(fname, 'r'))
|
||||
self.exprs = check_exprs(parser.exprs)
|
||||
exprs = check_exprs(parser.exprs)
|
||||
self.docs = parser.docs
|
||||
self._entity_dict = {}
|
||||
self._predefining = True
|
||||
self._def_predefineds()
|
||||
self._predefining = False
|
||||
self._def_exprs()
|
||||
self._def_exprs(exprs)
|
||||
self.check()
|
||||
except QAPIError as err:
|
||||
print(err, file=sys.stderr)
|
||||
@ -1652,8 +1652,8 @@ class QAPISchema(object):
|
||||
name, info, doc, 'arg', self._make_members(data, info))
|
||||
self._def_entity(QAPISchemaEvent(name, info, doc, data, boxed))
|
||||
|
||||
def _def_exprs(self):
|
||||
for expr_elem in self.exprs:
|
||||
def _def_exprs(self, exprs):
|
||||
for expr_elem in exprs:
|
||||
expr = expr_elem['expr']
|
||||
info = expr_elem['info']
|
||||
doc = expr_elem.get('doc')
|
||||
|
Loading…
Reference in New Issue
Block a user