From: Ian Jackson Subject: Re: [PATCH v2-resend 06/30] libxl: ocaml: support for Arrays in bindings generator. Date: Tue, 27 Aug 2013 16:12:40 +0100 Message-ID: <21020.49640.529364.676819@mariner.uk.xensource.com> References: <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-7-git-send-email-rob.hoes@citrix.com> <21020.48845.509417.667308@mariner.uk.xensource.com> <1377616015.29147.57.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377616015.29147.57.camel@kazak.uk.xensource.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: Ian Campbell Cc: Rob Hoes , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH v2-resend 06/30] libxl: ocaml: support for Arrays in bindings generator."): > On Tue, 2013-08-27 at 15:59 +0100, Ian Jackson wrote: > > Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 06/30] libxl: ocaml: support for Arrays in bindings generator."): > > > No change in generated code because no arrays are currently generated. > > > > This patch doesn't seem to have code for initialising, freeing, etc., > > arrays. Shouldn't it ? > > There's a calloc in there, and each element is initialised with a call > to c_val (which will already incorporate a libxl_foo_init as necessry), > the free is in the call to libxl_foo_dispose which comes from existing > bits of the bindings generator. Oh, I see, we're just adding support for arrays in ocaml - and half of it is already there, but unused, for some reason. How confusing. Looking at the existing code am I right in thinking that we're just adding support here for converting arrays from ocaml to C ? Ian.