Received: from eggs.gnu.org ([2001:4830:134:3::10]:60110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlGfe-0002Ya-IR for qemu-devel@nongnu.org; Thu, 23 Apr 2015 08:55:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YlGfb-0003B8-Co for qemu-devel@nongnu.org; Thu, 23 Apr 2015 08:55:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YlGfb-0003B4-4y for qemu-devel@nongnu.org; Thu, 23 Apr 2015 08:55:55 -0400 Date: Thu, 23 Apr 2015 14:55:06 +0200 From: Kevin Wolf Message-ID: <20150423125506.GI5289@noname.redhat.com> References: <1427995743-7865-1-git-send-email-armbru@redhat.com> <1427995743-7865-20-git-send-email-armbru@redhat.com> <55285792.70103@redhat.com> <552E6016.1000309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <552E6016.1000309@redhat.com> 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: Eric Blake Cc: mdroth@linux.vnet.ibm.com, akong@redhat.com, Alberto Garcia , Markus Armbruster , qemu-devel@nongnu.org Am 15.04.2015 um 14:56 hat Eric Blake geschrieben: > 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. But would we want to expose that on the external API? So far we always said that the mapping to integer constants is an implementation detail and can safely be changed. Kevin