hare

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

commit 5731b48ba15a8fc0f9306b4f26e541e42c08a00b
parent c0d600947403bf357fd462d873e084ac1f6b920f
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Thu, 18 Mar 2021 20:04:18 -0400

Update for prototype grammar changes

Diffstat:
Mrt/+linux/syscalls.ha | 14+++++++-------
Mrt/+linux/types.ha | 4++--
Mtime/+linux/functions.ha | 8++++----
3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -1,10 +1,10 @@ -fn syscall0(u64) u64; -fn syscall1(u64, u64) u64; -fn syscall2(u64, u64, u64) u64; -fn syscall3(u64, u64, u64, u64) u64; -fn syscall4(u64, u64, u64, u64, u64) u64; -fn syscall5(u64, u64, u64, u64, u64, u64) u64; -fn syscall6(u64, u64, u64, u64, u64, u64, u64) u64; +fn syscall0(_: u64) u64; +fn syscall1(_: u64, _: u64) u64; +fn syscall2(_: u64, _: u64, _: u64) u64; +fn syscall3(_: u64, _: u64, _: u64, _: u64) u64; +fn syscall4(_: u64, _: u64, _: u64, _: u64, _: u64) u64; +fn syscall5(_: u64, _: u64, _: u64, _: u64, _: u64, _: u64) u64; +fn syscall6(_: u64, _: u64, _: u64, _: u64, _: u64, _: u64, _: u64) u64; def PATH_MAX: size = 4096z; export type path = (str | []u8 | *const char); diff --git a/rt/+linux/types.ha b/rt/+linux/types.ha @@ -483,8 +483,8 @@ export def SA_RESTORER: u64 = 0x04000000; export type sigact = struct { union { - sa_handler: *fn (int) void, - sa_sigaction: *fn (int, *siginfo, *void) void, + sa_handler: *fn (_: int) void, + sa_sigaction: *fn (_: int, _: *siginfo, _: *void) void, }, sa_flags: u64, sa_restorer: *fn () void, diff --git a/time/+linux/functions.ha b/time/+linux/functions.ha @@ -56,23 +56,23 @@ export type clock = enum { BOOT = 7, }; -let cgt_vdso: nullable *fn(int, *rt::timespec) int = null; +let cgt_vdso: nullable *fn(_: int, _: *rt::timespec) int = null; -fn get_cgt_vdso() nullable *fn(int, *rt::timespec) int = { +fn get_cgt_vdso() nullable *fn(_: int, _: *rt::timespec) int = { static let vdso_checked: bool = false; if (vdso_checked) return cgt_vdso; vdso_checked = true; cgt_vdso = vdso::get_vdso_sym(VDSO_CGT_SYM, VDSO_CGT_VER) - : nullable *fn(int, *rt::timespec) int; + : nullable *fn(_: int, _: *rt::timespec) int; return cgt_vdso; }; fn now_vdso(clock: clock, tp: *rt::timespec) (void | rt::errno) = { let vfn = match (get_cgt_vdso()) { null => return rt::wrap_errno(rt::ENOSYS), - vfn: *fn(int, *rt::timespec) int => vfn, + vfn: *fn(_: int, _: *rt::timespec) int => vfn, }; let ret = vfn(clock, tp); if (ret == 0) {