Skip to content

Commit

Permalink
doc; relax some types
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Feb 27, 2024
1 parent f58d402 commit 7a11ab6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/core/in_buf.mli
Expand Up @@ -6,8 +6,10 @@ class type t =
inherit In.t

method fill_buf : unit -> Slice.t
(** returns a slice into the [bic]'s internal buffer,
and ensures it's empty only if [bic.ic] is empty. *)
(** [ic#fill_buf()] returns a slice into the [ic]'s internal buffer,
and ensures it's empty only if [ic.ic] is empty. In other
words, the invariant is that this only returns
an empty slice if the input stream is exhausted. *)

method consume : int -> unit
(** Consume [n] bytes from the inner buffer. This is only
Expand Down
8 changes: 5 additions & 3 deletions src/core/out_buf.mli
Expand Up @@ -35,7 +35,9 @@ class dummy : t
val dummy : t
(** Dummy output, drops everything written to it. *)

(** Make a bufferized output from a non bufferized output+close *)
(** Make a bufferized output from a non bufferized output+close.
@param bytes the buffer to use. It's owned by this channel as long
as the channel exists. *)
class virtual t_from_output :
?bytes:bytes
-> unit
Expand All @@ -50,9 +52,9 @@ class virtual t_from_output :
flush and then call this. *)
end

class bufferized : ?bytes:bytes -> Out.t -> t
class bufferized : ?bytes:bytes -> #Out.t -> t

val bufferized : ?bytes:bytes -> Out.t -> t
val bufferized : ?bytes:bytes -> #Out.t -> t

class of_out_channel : ?close_noerr:bool -> out_channel -> t_seekable

Expand Down

0 comments on commit 7a11ab6

Please sign in to comment.