No users of this yet so no overall change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
# Parse the C file looking for calls to:
# c_bitmap_to_ocaml_list()
+# ocaml_list_to_c_bitmap()
#
# followed by anotations of the following form:
# /* ! OType OPrefix Mangle */
# The function definitions use /* ! */ which simply skips that instance.
while (<>) {
if ($cline == -1) {
- if (m/c_bitmap_to_ocaml_list/) {
+ if (m/c_bitmap_to_ocaml_list|ocaml_list_to_c_bitmap/) {
$cline = 0;
$ei = { };
}
CAMLreturn(list);
}
+#if 0 /* unused, will be used in a moment */
+static unsigned int ocaml_list_to_c_bitmap(value l)
+ /* ! */
+ /*
+ * All calls to this function must be in a form suitable
+ * for xenctrl_abi_check. The parsing there is ad-hoc.
+ */
+{
+ unsigned int val;
+
+ for ( ; l != Val_none; l = Field(l, 1) )
+ val |= 1u << Int_val(Field(l, 0));
+
+ return val;
+}
+#endif
+
CAMLprim value stub_xc_domain_create(value xch, value config)
{
CAMLparam2(xch, config);