[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 23/27] libxl: ocaml: add VM lifecycle operations
On Tue, 2013-11-12 at 12:27 +0000, Rob Hoes wrote: > As far as I can see, the code is in Wheezy's > ocaml-nox_3.12.1-4_amd64.deb, in the > file /usr/lib/ocaml/caml/memory.h. Have you got that package? Ah, I was only grepping under /usr/include/ocaml of course! I suppose some magic in the ocamlc compiler adds this path to the search path? > > > > > > > > We would really like to keep this stuff working with some of the > > > > more common distro's stable versions of ocaml, so if this is really > > > > missing then perhaps a compat version would be needed? > > > > > > I'll see if I can find out more... > > > > > > > WTF is it doing anyway? Something to do with this C struct pointer > > > > containing a Value? > > > > > > The docs say: > > > "The macros CAMLreturn, CAMLreturn0, and CAMLreturnT are used to > > > replace the C keyword return. Every occurence of return x must be > > > replaced by CAMLreturn (x) if x has type value, or CAMLreturnT (t, x) > > > (where t is the type of x); every occurence of return without argument > > > must be replaced by CAMLreturn0. If your C function is a procedure > > > (i.e. if it returns void), you must insert CAMLreturn0 at the end (to > > > replace Câs implicit return)." > > > > There are quite a number of bare returns in the bindings. I guess all cases > > which have no CAMLlocal etc? > > That is fine in functions that do not allocate any OCaml values. It > does look though, that there are still some functions that use OCaml > values in them, that do not have CAMLlocal/param/return. This is not > necessarily a problem, but it may be better to add those macros, just > to be absolutely sure. I'll see if a follow-up patch is desirable. OK. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |