[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 2.1 00/36] Pending monitor patches for 2.1, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 02/36] qapi: Add includes from qapi/ as dependencies, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 04/36] qapi script: add event support, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 01/36] os-posix: include sys/time.h, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 05/36] test: add test cases for qapi event, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 08/36] qapi: add new schema file qapi-event.json, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 03/36] qapi: add event helper functions, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 06/36] qapi: adjust existing defines, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 07/36] monitor: add an implemention of qapi event emit method, Paolo Bonzini, 2014/06/18
- [Qemu-devel] [PATCH 2.1 09/36] qapi event: convert SHUTDOWN, Paolo Bonzini, 2014/06/18