Displaying 1 result from an estimated 1 matches for "nbd_internal_ocaml_raise_error".
2019 Jul 25
2
[libnbd PATCH] generator: Let nbd_aio_get_direction return unsigned
...locking_section ();\n";
pr " r = nbd_%s " name;
@@ -4757,14 +4781,17 @@ let print_ocaml_binding (name, { args; ret }) =
pr ";\n";
pr " caml_leave_blocking_section ();\n";
pr "\n";
- pr " if (r == %s)\n" errcode;
- pr " nbd_internal_ocaml_raise_error ();\n";
- pr "\n";
+ (match errcode with
+ | Some code ->
+ pr " if (r == %s)\n" code;
+ pr " nbd_internal_ocaml_raise_error ();\n";
+ pr "\n"
+ | None -> ()
+ );
(match ret with
| RBool -> pr " rv = Val_bo...