mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 01:35:30 +00:00
qapi/common: Eliminate QAPISchema.exprs
Backports commit 71a7510baf8a5745eb844ab289f007ff8bbbee41 from qemu
This commit is contained in:
parent
3ab06081d4
commit
b859a59f49
|
@ -1470,13 +1470,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)
|
||||
|
@ -1661,8 +1661,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 a new issue