[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode |
Date: |
Thu, 21 Jul 2016 16:55:54 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 07/21/2016 08:00 AM, address@hidden wrote:
> 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 | 29 +++++------------------------
> 1 file changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
> index a06a2c4..4754ae0 100644
> --- a/scripts/qapi-commands.py
> +++ b/scripts/qapi-commands.py
> @@ -84,17 +84,8 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s
> ret_in, QObject **ret_out,
>
>
> def gen_marshal_proto(name):
> - ret = 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' %
> c_name(name)
> - if not middle_mode:
> - ret = 'static ' + ret
> - return ret
> -
> -
> -def gen_marshal_decl(name):
> - return mcgen('''
> -%(proto)s;
> -''',
> - proto=gen_marshal_proto(name))
> + return 'static void qmp_marshal_%s' % c_name(name) + \
> + '(QDict *args, QObject **ret, Error **errp)'
I'm wondering if this should be:
return mcgen('''
static void qmp_marshal_%(c_name)s(QDict *args, QObject **ret, Error **errp)
''',
c_name=c_name(name))
for consistency with our other code (I'm not sure why we weren't already
using mcgen(), though).
Otherwise, nice to see it go!
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 03/12] monitor: register gen:false commands manually, (continued)
- [Qemu-devel] [PATCH v2 03/12] monitor: register gen:false commands manually, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 05/12] monitor: register the qapi generated commands, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 07/12] monitor: implement 'qmp_query_commands' without qmp_cmds, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 06/12] monitor: remove mhandler.cmd_new, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode, marcandre . lureau, 2016/07/21
- Re: [Qemu-devel] [PATCH v2 09/12] qapi: remove the "middle" mode,
Eric Blake <=
- [Qemu-devel] [PATCH v2 08/12] build-sys: remove qmp-commands-old.h, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 10/12] monitor: use qmp_dispatch(), marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 11/12] qmp: update qmp_query_spice fallback, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v2 12/12] Drop qmp-commands.hx, marcandre . lureau, 2016/07/21