From: Ian Campbell Subject: Re: [PATCH 29 of 32 RFC] libxl: add named enum for timer mode Date: Tue, 17 Jan 2012 11:26:49 +0000 Message-ID: <1326799609.14689.101.camel@zakaz.uk.xensource.com> References: <20244.19890.395440.528682@mariner.uk.xensource.com> <1326731120.14689.21.camel@zakaz.uk.xensource.com> <20244.20465.336196.143853@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20244.20465.336196.143853@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2012-01-16 at 16:27 +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH 29 of 32 RFC] libxl: add named enum for timer mode"): > > I'm happy to take either approach to be honest. I imagine most _init > > functions will turn into just a memset anyway at which point maybe we > > should just ditch them. > > > > I'd rather either all data types had an init or none is my only real > > feeling on the matter. > > I absolutely agree. (The init function could be autogenerated.) OK, I shall arrange that each type libxl_FOO has a libxl_FOO_init which cannot fail and which is (normally) generated from the IDL. Likewise I will arrange for a libxl_FOO_setdefaults which can fail. This gives us the freedom to have non-zero representation for the default on a per-type or per-field exceptional basis. This will however make this series even larger... > > > we could decree that all-bits-set means "use default value". > > > > Do you mean in genral or just this specific field? > > In general. > > Ian.