qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code
Date: Thu, 23 Jul 2015 11:41:48 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 07/01/2015 02:22 PM, Markus Armbruster wrote:
> Rename gen_marshal_input() to gen_marshal(), because the generated
> function marshals both arguments and results.
> 
> Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and
> move the other variable declarations there, too.
> 
> Rename gen_visitor_input_block()() to gen_marshal_input_visit(), and

Double ().

> rearrange its code slightly.
> 
> Rename gen_marshal_input_decl() to gen_marshal_proto(), because the
> result isn't a full declaration, unlike gen_command_decl()'s.
> 
> New gen_marshal_decl() actually returns a full declaration.

No change to generated code; good.

> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  scripts/qapi-commands.py | 95 
> ++++++++++++++++++++++--------------------------
>  1 file changed, 43 insertions(+), 52 deletions(-)
> 

>      push_indent()
> +
> +    if rets:
> +        # FIXME fishy: only pointers are initialized
> +        if rets.c_null() == 'NULL':
> +            retval = '%s retval = NULL;' % rets.c_type()
> +        else:
> +            retval = '%s retval;' % rets.c_type()

May still need tweaking based on my earlier reviews.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]