hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 04e3fb1afd39d24700ea0d9311baa0b4a88b437a
parent fb78c7dfec91ab671537a26a8567606041ffa0bd
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun, 26 Dec 2021 15:57:05 +0300

io::limit{reader,writer}: take an io::handle

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mio/limit.ha | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/limit.ha b/io/limit.ha @@ -15,7 +15,7 @@ fn limitstream_create(source: handle, limit: size) limitstream = { // Create an overlay stream that only allows a limited amount of bytes to be // read from the underlying stream. This stream does not need to be closed, and // closing it does not close the underlying stream. -export fn limitreader(source: *stream, limit: size) limitstream = { +export fn limitreader(source: handle, limit: size) limitstream = { let stream = limitstream_create(source, limit); stream.reader = &limit_read; return stream; @@ -24,7 +24,7 @@ export fn limitreader(source: *stream, limit: size) limitstream = { // Create an overlay stream that only allows a limited amount of bytes to be // written to the underlying stream. This stream does not need to be closed, and // closing it does not close the underlying stream. -export fn limitwriter(source: *stream, limit: size) limitstream = { +export fn limitwriter(source: handle, limit: size) limitstream = { let stream = limitstream_create(source, limit); stream.writer = &limit_write; return stream;