[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 09/15] qapi: remove the "middle" mode
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v3 09/15] qapi: remove the "middle" mode |
Date: |
Mon, 8 Aug 2016 18:14:33 +0400 |
From: Marc-André Lureau <address@hidden>
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 <address@hidden>
---
scripts/qapi-commands.py | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 4f64c58..11aa54b 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -209,8 +209,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
@@ -222,22 +221,14 @@ class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
if ret_type and ret_type not in self._visited_ret_types:
self._visited_ret_types.add(ret_type)
self.defn += gen_marshal_output(ret_type)
- export = middle_mode or export_marshal
- if export:
+ if export_marshal:
self.decl += gen_marshal_decl(name, True)
- self.defn += gen_marshal(name, arg_type, boxed, ret_type, export)
- if not middle_mode:
- self._regy += gen_register_command(name, success_response)
+ self.defn += gen_marshal(name, arg_type, boxed, ret_type,
+ export_marshal)
+ 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 = '''
/*
--
2.9.0
- Re: [Qemu-devel] [PATCH v3 03/15] monitor: register gen:false commands manually, (continued)
- [Qemu-devel] [PATCH v3 04/15] monitor: remove usage of generated marshal functions, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 05/15] qapi: add 'export-marshal' command key, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 06/15] monitor: register the qapi generated commands, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 07/15] monitor: remove mhandler.cmd_new, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 08/15] monitor: implement 'qmp_query_commands' without qmp_cmds, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 09/15] qapi: remove the "middle" mode,
marcandre . lureau <=
- [Qemu-devel] [PATCH v3 10/15] qapi: check invalid arguments on no-args commands, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 11/15] qmp: update qmp_query_spice fallback, marcandre . lureau, 2016/08/08
- [Qemu-devel] [PATCH v3 12/15] monitor: use qmp_dispatch(), marcandre . lureau, 2016/08/08