Displaying 3 results from an estimated 3 matches for "closure_mark".
2020 Sep 08
2
Re: [libnbd PATCH 1/2] generator: Refactor handling of closures in unlocked functions
....ml b/generator/C.ml
> index deb77fa..280b319 100644
> --- a/generator/C.ml
> +++ b/generator/C.ml
> @@ -99,16 +99,17 @@ let rec name_of_arg = function
> | UInt64 n -> [n]
>
> let rec print_arg_list ?(wrap = false) ?maxcol ?handle ?types ?(parens = true)
> + ?(closure_mark) args optargs =
You don't need parens around here, you can just write ?closure_mark
> + if parens then pr "(";
> + if wrap then
> + pr_wrap ?maxcol ','
> + (fun () -> print_arg_list' ?handle ?types ?closure_mark args optargs)
> + else
> +...
2020 Sep 07
0
[libnbd PATCH 1/2] generator: Refactor handling of closures in unlocked functions
...1 deletions(-)
diff --git a/generator/C.ml b/generator/C.ml
index deb77fa..280b319 100644
--- a/generator/C.ml
+++ b/generator/C.ml
@@ -99,16 +99,17 @@ let rec name_of_arg = function
| UInt64 n -> [n]
let rec print_arg_list ?(wrap = false) ?maxcol ?handle ?types ?(parens = true)
+ ?(closure_mark) args optargs =
+ if parens then pr "(";
+ if wrap then
+ pr_wrap ?maxcol ','
+ (fun () -> print_arg_list' ?handle ?types ?closure_mark args optargs)
+ else
+ print_arg_list' ?handle ?types ?closure_mark args optargs;
+ if parens then pr ")"
+
+...
2020 Sep 07
4
[libnbd PATCH 0/2] Fix memory leak with closures
As promised in my earlier thread on libnbd completion callback question.
Eric Blake (2):
generator: Refactor handling of closures in unlocked functions
generator: Free closures on failure
docs/libnbd.pod | 2 +-
generator/C.ml | 48 +++++++++++------
generator/C.mli | 1 +
lib/debug.c | 7 +--
lib/opt.c | 31 ++++++-----