mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/ocaml/libs: Don't declare stubs as taking void
There is no such thing as an Ocaml function (C stub or otherwise) taking no parameters. In the absence of any other parameters, unit is still passed. This doesn't explode with any ABI we care about, but would malfunction for an ABI environment such as stdcall. Fixes:c3afd398ba("ocaml: Add XS bindings.") Fixes:8b7ce06a2d("ocaml: Add XC bindings.") Signed-off-by: Edwin Török <edwin.torok@cloud.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Christian Lindig <christian.lindig@citrix.com>
This commit is contained in:
1 parent
e6f07052ce
commit
ff8b560be8
2 files changed
+4
-5
No files matched your search
@@ -30,10 +30,9 @@
|
||||
#include <xenctrl.h>
|
||||
#include <xen/io/xs_wire.h>
|
||||
|
||||
CAMLprim value stub_header_size(void)
|
||||
CAMLprim value stub_header_size(value unit)
|
||||
{
|
||||
CAMLparam0();
|
||||
CAMLreturn(Val_int(sizeof(struct xsd_sockmsg)));
|
||||
return Val_int(sizeof(struct xsd_sockmsg));
|
||||
}
|
||||
|
||||
CAMLprim value stub_header_of_string(value s)
|
||||
|
||||
@@ -86,9 +86,9 @@ static void Noreturn failwith_xc(xc_interface *xch)
|
||||
caml_raise_with_string(*caml_named_value("xc.error"), error_str);
|
||||
}
|
||||
|
||||
CAMLprim value stub_xc_interface_open(void)
|
||||
CAMLprim value stub_xc_interface_open(value unit)
|
||||
{
|
||||
CAMLparam0();
|
||||
CAMLparam1(unit);
|
||||
CAMLlocal1(result);
|
||||
xc_interface *xch;
|
||||
|
||||
|
||||