diff options
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r-- | scripts/qapi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 400c4ef4a6..27284be144 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -999,6 +999,10 @@ class QAPISchemaObjectType(QAPISchemaType): # _def_predefineds() return self.name.startswith('q_') + def is_empty(self): + assert self.members is not None + return not self.members and not self.variants + def c_name(self): assert self.name != 'q_empty' return QAPISchemaType.c_name(self) |