From: Ian Campbell Subject: Re: [PATCH 2/3] libxl_types.idl: use empty Struct for invalid domain type Date: Thu, 10 Apr 2014 13:45:15 +0100 Message-ID: <1397133915.9862.162.camel@kazak.uk.xensource.com> References: <1397133791-19885-1-git-send-email-wei.liu2@citrix.com> <1397133791-19885-3-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397133791-19885-3-git-send-email-wei.liu2@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: Wei Liu Cc: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-10 at 13:43 +0100, Wei Liu wrote: > Using None makes gentypes.py generates a C function which generates > nothing. Eventually the generated JSON string is malformed. I'd prefer to fix the generator to not do this rather than muddying the input description. How hard would it be? Ian. > > Signed-off-by: Wei Liu > --- > tools/libxl/libxl_types.idl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index 612645c..25f879c 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -384,7 +384,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ > # Use host's E820 for PCI passthrough. > ("e820_host", libxl_defbool), > ])), > - ("invalid", None), > + ("invalid", Struct(None, [])), > ], keyvar_init_val = "LIBXL_DOMAIN_TYPE_INVALID")), > ], dir=DIR_IN > )