From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxiT0-00060I-7n for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:57:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxiSv-00057A-IC for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:57:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46291) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxiSv-000572-8P for qemu-devel@nongnu.org; Thu, 19 Jun 2014 15:57:45 -0400 Message-ID: <53A340B6.4040207@redhat.com> Date: Thu, 19 Jun 2014 13:57:42 -0600 From: Eric Blake MIME-Version: 1.0 References: <1403073840-32603-1-git-send-email-pbonzini@redhat.com> <1403073840-32603-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1403073840-32603-5-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eNWot1pwJo09MptoQEmaaXg3KcaLN84Mm" Subject: Re: [Qemu-devel] [PATCH 2.1 04/36] qapi script: add event support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: wenchaoqemu@gmail.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eNWot1pwJo09MptoQEmaaXg3KcaLN84Mm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/18/2014 12:43 AM, Paolo Bonzini wrote: > From: Wenchao Xia >=20 > 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". >=20 > + if params: > + for argname, argentry, optional, structured in parse_args(para= ms): > + if optional: > + api_name +=3D "bool has_%s,\n" % c_var(argname) > + api_name +=3D "".ljust(l) > + > + if argentry =3D=3D "str": > + api_name +=3D "const " > + api_name +=3D "%s %s,\n" % (c_type(argentry), c_var(argnam= e)) Wenchao, when you write your followup cleanups to this series, rewrite this to use c_type(argentry, is_param=3DTrue) 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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eNWot1pwJo09MptoQEmaaXg3KcaLN84Mm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTo0C2AAoJEKeha0olJ0NqpAYH/i3mXaWi5vas8bugQOWGupQX s5O22w9u3DdStMHVXbbCd/vJf/+bRtq43IAhuJG/xdI3MTkvVVkrQn2Ku7fAjvCC iGVz+iqJnj84Nq0IhxlIJRs4c+8ib1v5frHD0nv/ZiD/vuvwqdeI0704oStRZV7C OLB++MeWP2AiBGGkpi2QHdL3LYY54wLEf8ti554gSEYUmyx53zPwnrwwUKAIWCX0 na0F4rPjGTzN6iMOeJagJFSBxkV+NclO68XKVphxOpvQAYzz/AG6h7nJHCkiicxH Y17cHNLtQv2gAldq0kYoQ1CGTf0eCLoEhYWEbPWtbWq2+KUGLvaVgOODmkY+DHE= =Jgch -----END PGP SIGNATURE----- --eNWot1pwJo09MptoQEmaaXg3KcaLN84Mm--