From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMsx-0000m9-HW for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:57:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiMst-0002ov-LG for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:57:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiMst-0002ob-EG for qemu-devel@nongnu.org; Wed, 15 Apr 2015 08:57:39 -0400 Message-ID: <552E6016.1000309@redhat.com> Date: Wed, 15 Apr 2015 06:56:54 -0600 From: Eric Blake MIME-Version: 1.0 References: <1427995743-7865-1-git-send-email-armbru@redhat.com> <1427995743-7865-20-git-send-email-armbru@redhat.com> <55285792.70103@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 19/19] qapi: New QMP command query-schema for QMP schema introspection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, akong@redhat.com, mdroth@linux.vnet.ibm.com On 04/15/2015 03:16 AM, Alberto Garcia wrote: > On Sat 11 Apr 2015 01:06:58 AM CEST, Eric Blake wrote: > >>> +{ 'type': 'SchemaInfoEnum', >>> + 'data': { 'values': ['str'] } } >> >> At one point, one thread suggested that we might want to allow QAPI to >> support enums with fixed values, as in: >> >> 'data': [ {'one': 1}, {'three': 3} ] > > Out of curiosity, what's the use case for that? If we add that extension, it will allow the creation of C enums with specific values, rather than defaulting to consecutive initialization from 0. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org