Displaying 2 results from an estimated 2 matches for "52079d2".
2015 Nov 10
7
[PATCH 0/4]: mllib: Add 'may' function, and refactoring.
The 'may' function is a higher-order function (HOF) that replaces:
match x with
| None -> ()
| Some x -> f x
with:
may f x
The idea comes from lablgtk (OCaml Gtk bindings) where it is widely
used.
If this change is clearer than previous code, then this could be used
in many more places. However I previously steered clear from using
HOFs like this because they can be
2015 Nov 10
0
[PATCH 4/4] mllib, v2v: Allow open_guestfs to set the handle identifier.
...ommon_utils.ml | 3 ++-
mllib/common_utils.mli | 2 +-
v2v/output_rhev.ml | 3 +--
v2v/output_vdsm.ml | 3 +--
v2v/v2v.ml | 3 +--
v2v/windows.ml | 3 +--
6 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 52079d2..13e9256 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -363,10 +363,11 @@ let info fs =
(* Common function to create a new Guestfs handle, with common options
* (e.g. debug, tracing) already set.
*)
-let open_guestfs () =
+let open_guestfs ?identifier () =
let g = new Gu...