[Libguestfs] [libguestfs-common PATCH] Add support for OCaml 5.0

Jürgen Hötzel juergen at archlinux.org
Sat May 20 16:16:40 UTC 2023


Pervasives is deprecated since Ocaml 4.08 and has been
removed in OCaml 5.0.

https://github.com/ocaml/ocaml/pull/1605
---
 mlstdutils/std_utils.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mlstdutils/std_utils.ml b/mlstdutils/std_utils.ml
index 0d2fa22..86b21a7 100644
--- a/mlstdutils/std_utils.ml
+++ b/mlstdutils/std_utils.ml
@@ -341,12 +341,12 @@ module List = struct
       | x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs
       | _ -> invalid_arg "combine3"
 
-    let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
+    let rec assoc_lbl ?(cmp = Stdlib.compare) ~default x = function
       | [] -> default
       | (y, y') :: _ when cmp x y = 0 -> y'
       | _ :: ys -> assoc_lbl ~cmp ~default x ys
 
-    let uniq ?(cmp = Pervasives.compare) xs =
+    let uniq ?(cmp = Stdlib.compare) xs =
       let rec loop acc = function
         | [] -> acc
         | [x] -> x :: acc
-- 
2.40.1



More information about the Libguestfs mailing list