Skip to content

Commit

Permalink
Remove {input,output}_binary_int
Browse files Browse the repository at this point in the history
  • Loading branch information
nojb committed Aug 31, 2021
1 parent c2acd3e commit 1cacfa1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions stdlib/in_channel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ let input_line ic =
| s -> Some s
| exception End_of_file -> None

let input_binary_int ic =
match Stdlib.input_binary_int ic with
| n -> Some n
| exception End_of_file -> None

let input = Stdlib.input

let really_input ic buf pos len =
Expand Down
5 changes: 0 additions & 5 deletions stdlib/in_channel.mli
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ val input_line : t -> string option
{!Sys.win32} is [true] in which case it is the sequence of characters
[\r\n]. *)

val input_binary_int : t -> int option
(** Read an integer encoded in binary format (4 bytes, big-endian) from the
given input channel. See {!Out_channel.output_binary_int}. Returns [None]
if the end of file was reached while reading the integer. *)

val input : t -> bytes -> int -> int -> int
(** [input ic buf pos len] reads up to [len] characters from the given channel
[ic], storing them in byte sequence [buf], starting at character number
Expand Down
1 change: 0 additions & 1 deletion stdlib/out_channel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ let output_string = Stdlib.output_string
let output_bytes = Stdlib.output_bytes
let output = Stdlib.output
let output_substring = Stdlib.output_substring
let output_binary_int = Stdlib.output_binary_int
let set_binary_mode = Stdlib.set_binary_mode_out
6 changes: 0 additions & 6 deletions stdlib/out_channel.mli
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ val output_substring : t -> string -> int -> int -> unit
(** Same as {!output} but take a string as argument instead of a byte
sequence. *)

val output_binary_int : t -> int -> unit
(** Write one integer in binary format (4 bytes, big-endian) on the given output
channel. The given integer is taken modulo 2{^32}. The only reliable way
to read it back is through the {!In_channel.input_binary_int} function. The
format is compatible across all machines for a given version of OCaml. *)

val set_binary_mode : t -> bool -> unit
(** [set_binary_mode oc true] sets the channel [oc] to binary mode: no
translations take place during output.
Expand Down

0 comments on commit 1cacfa1

Please sign in to comment.