aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi/common.py')
-rw-r--r--scripts/qapi/common.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index 2c5c40ec0a..23437b558f 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -2050,3 +2050,16 @@ class QAPIGenDoc(QAPIGen):
def _top(self, fname):
return (QAPIGen._top(self, fname)
+ '@c AUTOMATICALLY GENERATED, DO NOT MODIFY\n\n')
+
+
+class QAPISchemaMonolithicCVisitor(QAPISchemaVisitor):
+
+ def __init__(self, prefix, what, blurb, pydoc):
+ self._prefix = prefix
+ self._what = what
+ self._genc = QAPIGenC(blurb, pydoc)
+ self._genh = QAPIGenH(blurb, pydoc)
+
+ def write(self, output_dir):
+ self._genc.write(output_dir, self._prefix + self._what + '.c')
+ self._genh.write(output_dir, self._prefix + self._what + '.h')