From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smlgn-0002yh-GV for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:01:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmlgW-0008Sy-NI for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:01:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmlgW-0008Sp-Fe for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:01:28 -0400 Message-ID: <4FF59023.7070908@redhat.com> Date: Thu, 05 Jul 2012 07:01:23 -0600 From: Eric Blake MIME-Version: 1.0 References: <1341492525-29809-1-git-send-email-akong@redhat.com> <1341492525-29809-5-git-send-email-akong@redhat.com> In-Reply-To: <1341492525-29809-5-git-send-email-akong@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig8455F85544F8F16654FC94EB" Subject: Re: [Qemu-devel] [PATCH v4 4/6] qapi: generate list struct and visit_list for enum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8455F85544F8F16654FC94EB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/05/2012 06:48 AM, Amos Kong wrote: > Currently, if define an 'enum' and use it in one command's data, > List struct for enum could not be generated, but it's used in > qmp function. >=20 > For example: KeyCodesList could not be generated. >>>> qapi-schema.json: > { 'enum': 'KeyCodes', > 'data': [ 'shift', 'alt' ... ] } > { 'command': 'sendkey', > 'data': { 'keys': ['KeyCodes'], '*hold-time': 'int' } } >=20 >>>> qmp-command.h: > void qmp_sendkey(KeyCodesList * keys, bool has_hold_time, int64_t > hold_time, Error **errp); >=20 > This patch makes qapi can generate List struct for enum. Grammar nit: s/makes qapi can/lets/qapi/ --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig8455F85544F8F16654FC94EB 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP9ZAlAAoJEKeha0olJ0Nq5AgH+QFA8UjNM6egMooJ6KV7tQJb tK5GHMMqTQI1VikVeC36gNh9JgqKJcjv7nKDcgMYqEYg1uwxbo0GtNhnG2DVYd4H a8HxIfNd32hS5u2om+v3MW+ZdjXr/XWHLPvRgsHpdFK8SX9HfoILDdptvy3W2j41 +syW77MIeiNgBINfkJyH4DYdyvJfcryjbmBnkEatyqxV+Lg+KBOqJXcQ6hHhNG0z P9Nr3rS9a6bdQsc6siMeNbUuBt2fFbvaxPEJL7+qFyuAkI5ZX9/v4h5uoCWVJSA/ sG3rP/ZaqCtGIfD/BhSA3SahQUh42QJGUOexTcpSXkcv/xGzdMPS8QPUXDIsM+I= =Jhqt -----END PGP SIGNATURE----- --------------enig8455F85544F8F16654FC94EB--