From: Ian Campbell Subject: Re: [PATCH v4 1/3] libxl IDL: the name of a KeyedUnion descriminator need not be 'type' Date: Thu, 24 Jul 2014 16:52:27 +0100 Message-ID: <1406217147.8132.11.camel@kazak.uk.xensource.com> References: <1403512141-12283-1-git-send-email-dave.scott@citrix.com> <1406041520-561-1-git-send-email-dave.scott@citrix.com> <1406041520-561-2-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XALL1-00043I-UN for xen-devel@lists.xenproject.org; Thu, 24 Jul 2014 15:53:48 +0000 In-Reply-To: <1406041520-561-2-git-send-email-dave.scott@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Scott Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-07-22 at 16:05 +0100, David Scott wrote: > Signed-off-by: David Scott "discriminator" Since there are no existing KeyedUnions who's discriminator is not "type" there should be no change to the resulting code, but I've not gone and confirmed that myself. Acked-by: Ian Campbell I've applied this one and fixed the typo on the way. > --- > tools/libxl/gentypes.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py > index 4b0c996..3e73821 100644 > --- a/tools/libxl/gentypes.py > +++ b/tools/libxl/gentypes.py > @@ -440,7 +440,7 @@ def libxl_C_type_parse_json(ty, w, v, indent = " ", parent = None, discrimina > (f.type.keyvar.name + "." + x.name, w) > s += " if (x) {\n" > (nparent, fexpr) = ty.member(v, f.type.keyvar, parent is None) > - s += " %s_init_type(%s, %s);\n" % (ty.typename, v, x.enumname) > + s += " %s_init_%s(%s, %s);\n" % (ty.typename, f.type.keyvar.name, v, x.enumname) > (nparent,fexpr) = ty.member(v, f, parent is None) > s += libxl_C_type_parse_json(f.type, "x", fexpr, " ", nparent, x.enumname) > s += " }\n"