hare

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

commit 45235f53fe8121615aad186108880d91c8877d8e
parent 0c7d20e3f19c5ca2c953027c57c3ad6ff2f3f5f5
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 23 Feb 2021 09:44:12 -0500

os: take advantage of shadowing

Diffstat:
Mos/+linux/errors.ha | 4++--
Mos/+linux/fdstream.ha | 6+++---
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/os/+linux/errors.ha b/os/+linux/errors.ha @@ -8,9 +8,9 @@ fn io_errstr(data: *void) str = { // TODO: Implement the inverse of this and make it public fn errno_to_io(err: rt::errno) io::error = { - let e = io::os_error { + let err = io::os_error { string = &io_errstr, data = err: uintptr: *void, }; - return e: io::error; + return err: io::error; }; diff --git a/os/+linux/fdstream.ha b/os/+linux/fdstream.ha @@ -89,12 +89,12 @@ fn fd_close_static(s: *io::stream) void = { def SENDFILE_MAX: size = 2147479552z; -fn fd_copy(_to: *io::stream, _from: *io::stream) (size | io::error) = { - if (!is_fdstream(_from)) { +fn fd_copy(to: *io::stream, from: *io::stream) (size | io::error) = { + if (!is_fdstream(from)) { return io::unsupported; }; - let to = _to: *fd_stream, from = _from: *fd_stream; + let to = to: *fd_stream, from = from: *fd_stream; let sum = 0z; for (true) { let n = match (rt::sendfile(to.fd, from.fd,