@@ -72,7 +72,7 @@ module Op = struct
72
72
| Restrict -> " restrict"
73
73
end
74
74
75
- let split_string ? limit : (limit = max_int) c s =
75
+ let split_string ~ limit c s =
76
76
let len = String. length s in
77
77
let next_c from =
78
78
try
@@ -133,7 +133,7 @@ module ACL = struct
133
133
if String. length s < 2
134
134
then invalid_arg (Printf. sprintf " Permission string too short: '%s'" s);
135
135
int_of_string (String. sub s 1 (String. length s - 1 )), perm_of_char_exn s.[0 ] in
136
- let l = List. map perm_of_string (split_string '\000' s) in
136
+ let l = List. map perm_of_string (String. split_on_char '\000' s) in
137
137
match l with
138
138
| (owner , other ) :: l -> Some { owner = owner; other = other; acl = l }
139
139
| [] -> Some { owner = 0 ; other = NONE ; acl = [] }
@@ -174,7 +174,7 @@ let to_bytes pkt =
174
174
set_header_rid result pkt.rid ;
175
175
set_header_tid result pkt.tid ;
176
176
set_header_len result (Int32. of_int len) ;
177
- Bytes . blit ( Buffer. to_bytes pkt.data) 0 result sizeof_header len ;
177
+ Buffer . blit pkt.data 0 result sizeof_header len ;
178
178
result
179
179
180
180
let get_tid pkt = pkt.tid
@@ -489,7 +489,7 @@ module Request = struct
489
489
490
490
exception Parse_failure
491
491
492
- let strings data = split_string '\000' data
492
+ let strings data = String. split_on_char '\000' data
493
493
494
494
let one_string data =
495
495
let args = split_string ~limit: 2 '\000' data in
@@ -502,7 +502,7 @@ module Request = struct
502
502
let args = split_string ~limit: 2 '\000' data in
503
503
match args with
504
504
| a :: b :: [] -> a, b
505
- | a :: [] -> a, " " (* terminating NULL removed by get_data *)
505
+ | a :: [] -> a, " " (* terminating NUL removed by get_data *)
506
506
| _ ->
507
507
raise Parse_failure
508
508
@@ -619,7 +619,7 @@ module Request = struct
619
619
620
620
let data_of_payload = function
621
621
| PathOp (path , Write value ) ->
622
- path ^ " \000 " ^ value (* no NULL at the end *)
622
+ path ^ " \000 " ^ value (* no NUL at the end *)
623
623
| PathOp (path , Setperms perms ) ->
624
624
data_concat [ path; ACL. to_string perms ]
625
625
| PathOp (path , _ ) -> data_concat [ path ]
@@ -663,7 +663,7 @@ module Unmarshal = struct
663
663
let ok x = if x = " OK" then Some () else None
664
664
665
665
let string = some ++ get_data
666
- let list = some ++ split_string '\000' ++ get_data
666
+ let list = some ++ String. split_on_char '\000' ++ get_data
667
667
let acl = ACL. of_string ++ get_data
668
668
let int = int_of_string_opt ++ get_data
669
669
let int32 = int32_of_string_opt ++ get_data
0 commit comments