mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 11:45:31 -05:00
fix -safe-string issues
This commit is contained in:
parent
b11a98c6d3
commit
9f07d976c4
2 changed files with 4 additions and 6 deletions
|
|
@ -204,11 +204,6 @@ let with_out ?(mode=0o644) ?(flags=[]) filename =
|
|||
let with_out_a ?mode ?(flags=[]) filename =
|
||||
with_out ?mode ~flags:(Open_creat::Open_append::flags) filename
|
||||
|
||||
let _write oc s i len () = output oc s i len
|
||||
let write oc s i len = Wrap (_write oc s i len)
|
||||
|
||||
|
||||
|
||||
#if OCAML_MAJOR >= 4 && OCAML_MINOR >= 2
|
||||
|
||||
let output_str_ = Pervasives.output_substring
|
||||
|
|
@ -219,6 +214,9 @@ let output_str_ = Pervasives.output
|
|||
|
||||
#endif
|
||||
|
||||
let _write oc s i len () = output_str_ oc s i len
|
||||
let write oc s i len = Wrap (_write oc s i len)
|
||||
|
||||
let _write_str oc s () = output_str_ oc s 0 (String.length s)
|
||||
let write_str oc s = Wrap (_write_str oc s)
|
||||
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ val with_in : ?mode:int -> ?flags:open_flag list ->
|
|||
It yields a [in_channel] with a finalizer attached. See {!(>>>=)} to
|
||||
use it. *)
|
||||
|
||||
val read : in_channel -> string -> int -> int -> int t
|
||||
val read : in_channel -> Bytes.t -> int -> int -> int t
|
||||
(** Read a chunk into the given string *)
|
||||
|
||||
val read_line : in_channel -> string option t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue