[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2-resend 06/30] libxl: ocaml: support for Arrays in bindings generator.



> 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 ?

That's right: the C -> OCaml conversion for arrays was already there (in the 
ocaml_Val function).

Cheers,
Rob

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.