Skip to content

Commit 4a8b3a1

Browse files
committed
Avoid deprecated Re.get_all_ofs
Signed-off-by: Christian Lindig <[email protected]>
1 parent 0c9cebe commit 4a8b3a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/xcp_service.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module Config_file = struct
6565
let trim_trailing_ws line =
6666
let re_ws = Re.compile (Re.Emacs.re "[ \t]+$") in
6767
try
68-
let ofs = fst (Re.get_all_ofs (Re.exec re_ws line)).(0) in
68+
let ofs = fst (Re.Group.all_offset (Re.exec re_ws line)).(0) in
6969
String.sub line 0 ofs
7070
with Not_found ->
7171
line
@@ -80,7 +80,7 @@ module Config_file = struct
8080
let re = Re.compile (Re.Emacs.re "\\([^=\\ \t]+\\)[\\ \t]*=[\\ \t]*\\(.*\\)") in
8181
let get (x,y) = String.sub line x (y-x) in
8282
try
83-
match Re.get_all_ofs (Re.exec re line) with
83+
match Re.Group.all_offset (Re.exec re line) with
8484
| [| _; key_ofs; v_ofs |] ->
8585
(* First in array is always the full extent of all matches *)
8686
Some (get key_ofs, get v_ofs)

0 commit comments

Comments
 (0)