Skip to content

Commit 9283684

Browse files
committed
add touch-ups to docstrings
1 parent b386bc9 commit 9283684

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/codec.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ malfomed data from `source`. However, this method must not throw `EOFError`
7272
when reading data from `source`. Also note that it is responsible for this
7373
method to release resources allocated by `codec` when an exception happens.
7474
"""
75-
function process(::Type{Read}, codec::Codec, stream::IO, data::Ptr{UInt8}, nbytes::Int)
75+
function process(::Type{Read}, codec::Codec, source::IO, input::Ptr{UInt8}, nbytes::Int)
7676
error("codec $(codec) does not implement read mode")
7777
end
7878

@@ -84,9 +84,12 @@ Transcode data using `codec` with write mode.
8484
<> <-----(transcode)-----< [.......]
8585
sink codec input
8686
87-
This method reads some data from `input` and write the transcoded bytes to `sink`.
87+
This method reads some data from `input` and write the transcoded bytes to
88+
`sink` at most `nbytes`, and then returns the number of written bytes and an
89+
appropriate return code. It can assume `input` points to a valid memory position
90+
and `nbytes` is positive.
8891
"""
89-
function process(::Type{Write}, codec::Codec, stream::IO, data::Ptr{UInt8}, nbytes::Int)
92+
function process(::Type{Write}, codec::Codec, sink::IO, input::Ptr{UInt8}, nbytes::Int)
9093
error("codec $(codec) does not implement write mode")
9194
end
9295

0 commit comments

Comments
 (0)