From e4ce7f658741a7428597da4872435a1b0bae944c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 3 Oct 2026 20:51:22 +0200 Subject: Rework generics for parameters to be plain types --- source/common.elna | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/common.elna') diff --git a/source/common.elna b/source/common.elna index 4579a67..428c4ec 100644 --- a/source/common.elna +++ b/source/common.elna @@ -14,15 +14,15 @@ type end_location: ElnaLocation end -proc write*(fd: Int; buf: Pointer; Word: Int) -> Int +proc write*#[T](fd: Int; buf: ^const T; size: Word) -> Int extern proc write_s*(value: []const Word8) - write(1, cast(value.ptr: Pointer), cast(value.length: Int)) + write(1, value.ptr, value.length) return proc write_z*(value: ^Word8) - write(1, cast(value: Pointer), cast(strlen(value): Int)) + write(1, value, strlen(value)) return proc write_b*(value: Bool) -- cgit v1.2.3