|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 19/28] libxl: ocaml: add dominfo_list and dominfo_get
On Mon, 2013-03-25 at 14:45 +0000, Rob Hoes wrote:
> +value stub_xl_dominfo_list(value ctx)
> +{
> + CAMLparam1(ctx);
> + CAMLlocal2(domlist, temp);
> + libxl_dominfo *c_domlist;
> + int i, nb;
> +
> + c_domlist = libxl_list_domain(CTX, &nb);
> + if (!c_domlist)
> + failwith_xl(ERROR_FAIL, "dominfo_list");
> +
> + domlist = temp = Val_emptylist;
> + for (i = nb - 1; i >= 0; i--) {
> + domlist = caml_alloc_small(2, Tag_cons);
> + Field(domlist, 0) = Val_int(0);
> + Field(domlist, 1) = temp;
> + temp = domlist;
> +
> + Store_field(domlist, 0, Val_dominfo(&c_domlist[i]));
Is the preceding "Field(domlist, 0) = Val_int(0);" storing to the same
place and therefore redundant?
> + }
> +
> + libxl_dominfo_list_free(c_domlist, nb);
> +
> + CAMLreturn(domlist);
> +}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |