qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2.1 04/36] qapi script: add event support


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2.1 04/36] qapi script: add event support
Date: Thu, 19 Jun 2014 13:57:42 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 06/18/2014 12:43 AM, Paolo Bonzini wrote:
> From: Wenchao Xia <address@hidden>
> 
> qapi-event.py will parse the schema and generate qapi-event.c, then
> the API in qapi-event.c can be used to handle events in qemu code.
> All API have prefix "qapi_event".
> 

> +    if params:
> +        for argname, argentry, optional, structured in parse_args(params):
> +            if optional:
> +                api_name += "bool has_%s,\n" % c_var(argname)
> +                api_name += "".ljust(l)
> +
> +            if argentry == "str":
> +                api_name += "const "
> +            api_name += "%s %s,\n" % (c_type(argentry), c_var(argname))

Wenchao, when you write your followup cleanups to this series, rewrite
this to use c_type(argentry, is_param=True) instead of pre-pending
"const " yourself (basically, take advantage of Amos' "qapi: add const
prefix to 'char *' insider c_type()" which is now in the tree ahead of
your patches).

-- 
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]