aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-09-12 13:19:07 +0400
committerMarkus Armbruster <armbru@redhat.com>2016-09-19 17:32:22 +0200
commit077b009ebb98c45ac1a88332e2ddb99a88cc09cd (patch)
tree932e19d3206c46099a3a7f0ff7d6765b0ddd1a8c /scripts
parent2b9e35760a8ff5548f6789d048c6e6e3c22c70ee (diff)
qapi: remove the "middle" mode
Now that the register function is always generated, we can remove the so-called "middle" mode from the generator script. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20160912091913.15831-13-marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi-commands.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index b150db9792..eac64cedc5 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -206,8 +206,7 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
self._visited_ret_types = set()
def visit_end(self):
- if not middle_mode:
- self.defn += gen_registry(self._regy)
+ self.defn += gen_registry(self._regy)
self._regy = None
self._visited_ret_types = None
@@ -221,18 +220,10 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
self.defn += gen_marshal_output(ret_type)
self.decl += gen_marshal_decl(name)
self.defn += gen_marshal(name, arg_type, boxed, ret_type)
- if not middle_mode:
- self._regy += gen_register_command(name, success_response)
+ self._regy += gen_register_command(name, success_response)
-middle_mode = False
-
-(input_file, output_dir, do_c, do_h, prefix, opts) = \
- parse_command_line("m", ["middle"])
-
-for o, a in opts:
- if o in ("-m", "--middle"):
- middle_mode = True
+(input_file, output_dir, do_c, do_h, prefix, opts) = parse_command_line()
c_comment = '''
/*