On 06/18/2014 12:43 AM, Paolo Bonzini wrote: > From: Wenchao Xia <wenchaoq...@gmail.com> > > 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