From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ve3Ez-0006i6-M1 for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:33:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ve3Ev-00011Q-A8 for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:33:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:15937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ve3Ev-00011A-2N for qemu-devel@nongnu.org; Wed, 06 Nov 2013 08:33:45 -0500 Message-ID: <527A4535.50402@redhat.com> Date: Wed, 06 Nov 2013 06:33:41 -0700 From: Eric Blake MIME-Version: 1.0 References: <1383611860-9053-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1383611860-9053-8-git-send-email-xiawenc@linux.vnet.ibm.com> <5278F56E.70104@redhat.com> <5279B568.5070906@linux.vnet.ibm.com> In-Reply-To: <5279B568.5070906@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UgbvvOq3d260eDc5jsEAUHvhvofp3W4NE" Subject: Re: [Qemu-devel] [PATCH RFC 07/10] qapi script: support direct inheritance for struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, armbru@redhat.com, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UgbvvOq3d260eDc5jsEAUHvhvofp3W4NE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/05/2013 08:20 PM, Wenchao Xia wrote: >>> + 'server': { >>> + '_base': 'NetworkConnectionInfo', >> >> Interesting idea for shorthand. However, I would suggest that you pic= k >> a different character than '_', since '_' is valid in names. That is,= >> we already have special handling of leading '*' to mark a field as >> optional, so I suggest something like '^' to mark a base class. By >> using a non-name character, it becomes more obvious that the leading >> character has a special meaning to the qapi generator. >> >> I'm also not convinced yet that we want this shorthand; in particular,= >> I'm worried whether it will make the introspection patches harder to >> write. >> > I am not sure about this approach either, so put RFC tag on it. The > purpose is allow not to define structures that would be only used once.= >=20 > What instrospection patch do you mean? Python instrospection > mechnism? You mean there is a python utility which recognize > only keyword "base" now? No, I'm talking about Amos' patches to expose the qapi to the user via a QMP command. Last version proposed was here: https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg02494.html although with the addition of discriminated union types in the meantime, my understanding is Amos is planning on posting another version soon for the 1.8 timeframe. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UgbvvOq3d260eDc5jsEAUHvhvofp3W4NE 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSekU2AAoJEKeha0olJ0NqjaIH/RqU+xePXoW0zBdj3e12A+cx 9u1jr6S5sjzK6sNht8N5upWybFnjjzEvOsyzR3rUQmHzAuBIU/xDLm3ZbWcBJTNt PVLqBlulnwmIO/XiO/YRQYBkxwwN21nwUsSOJ12J5LleOi7ddHmW1+F3kJkE+XeR B4v8KUM2pj9EAs8I4GQBD6XZUiv1zsPsKOF9YHaFPoEcZFe/2GZxiH5VbevqA+FD p+lJC51oKIJl4U8TQnH4Cj4BVi6Zvt92XvDNzk+xRcURMbDKS+UPzB1vpHqXPccw fwGKVNu3SkF4TzSa0HJKnJPa5r8DI8eZEfV7zfZ3bMH9poryyFl0+6ulcQJySQk= =bd7r -----END PGP SIGNATURE----- --UgbvvOq3d260eDc5jsEAUHvhvofp3W4NE--