mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 17:55:27 +00:00
qapi: Special case c_name() for empty type
Commit 7ce106a rendered QAPISchemaObjectType.c_name() redundant, since it now does nothing more than delegate to its superclass. However, rather than deleting it, we can restore part of the assertion that was removed in that commit, to prove that we never emit the empty type directly in generated code, but rather special-case it as a built-in that makes other aspects of code generation easier to reason about. Backports commit cd50a2564560986e865ff64fa73b59d2564076f0 from qemu
This commit is contained in:
parent
8ccfff95fe
commit
febeea5f4b
|
@ -1006,6 +1006,7 @@ class QAPISchemaObjectType(QAPISchemaType):
|
|||
return self.name.startswith('q_')
|
||||
|
||||
def c_name(self):
|
||||
assert self.name != 'q_empty'
|
||||
return QAPISchemaType.c_name(self)
|
||||
|
||||
def c_type(self):
|
||||
|
|
Loading…
Reference in a new issue