Displaying 4 results from an estimated 4 matches for "pr_indent".
2019 Aug 31
1
[PATCH libnbd] Add bindings for Rust language
Still not working, but I took the latest patch and:
- rebased it against libnbd 1.0
- fixed it so it handles new args and cbargs
The generator now runs without warnings.
This patch doesn't handle optargs at all. In C these are converted to
non-optional parameter. Rust doesn't (AFAIK) have optional or
labelled arguments unfortunately.
Rich.
2019 Jul 07
2
[libnbd PATCH] RFC: Add bindings for Rust language
...et = RErr; may_set_error = false } ->
+ failwithf "%s: if ret is RErr, then may_set_error cannot be false"
+ name
| _ -> ()
) handle_calls
@@ -4652,6 +4655,302 @@ let generate_ocaml_nbd_c () =
List.iter print_ocaml_binding handle_calls
+let rec pr_indent = function
+ | 0 -> ()
+ | n -> pr " "; pr_indent (n - 1)
+
+let rec print_rust_ffi_arg_list ?(handle = false) indent args =
+ let pri () = pr_indent indent in
+ let pri2 () = pr_indent (indent + 1) in
+ pr "(\n";
+ if handle then (
+ pri (); pr "h: *mut n...
2012 Jan 20
11
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c.
The original commit was reverted prematurely.
---
generator/generator_actions.ml | 10 +++++-----
generator/generator_checks.ml | 5 +++++
generator/generator_types.ml | 3 +++
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml
index
2019 Jun 27
16
[PATCH 1/9] Rust bindings: Add Rust bindings
From: Hiroyuki_Katsura <hiroyuki.katsura.0513@gmail.com>
---
Makefile.am | 4 ++++
configure.ac | 3 +++
generator/Makefile.am | 3 +++
generator/bindtests.ml | 3 +++
generator/bindtests.mli | 1 +
generator/main.ml | 5 +++++
generator/rust.ml | 34 ++++++++++++++++++++++++++++++++++
generator/rust.mli | 19 +++++++++++++++++++