From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLw6o-0002AR-GE for qemu-devel@nongnu.org; Fri, 07 Mar 2014 09:50:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLw6h-0003vB-LM for qemu-devel@nongnu.org; Fri, 07 Mar 2014 09:50:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLw6h-0003uy-36 for qemu-devel@nongnu.org; Fri, 07 Mar 2014 09:50:39 -0500 From: Markus Armbruster References: <20140306080358.7fac2825@redhat.com> <1394154536-7867-1-git-send-email-wenchaoqemu@gmail.com> Date: Fri, 07 Mar 2014 15:50:30 +0100 In-Reply-To: <1394154536-7867-1-git-send-email-wenchaoqemu@gmail.com> (Wenchao Xia's message of "Thu, 6 Mar 2014 17:08:56 -0800") Message-ID: <87ob1im5ah.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 07/10] qapi script: support enum type as discriminator in union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Wenchao Xia writes: > By default, any union will automatically generate a enum type as > "[UnionName]Kind" in C code, and it is duplicated when the discriminator > is specified as a pre-defined enum type in schema. After this patch, > the pre-defined enum type will be really used as the switch case > condition in generated C code, if discriminator is an enum field. > > Signed-off-by: Wenchao Xia Reviewed-by: Markus Armbruster