fix -safe-string issues

This commit is contained in:
Simon Cruanes 2015-06-29 10:21:42 +02:00
parent b11a98c6d3
commit 9f07d976c4
2 changed files with 4 additions and 6 deletions

View file

@ -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)

View file

@ -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