From 5d808dd4c4003968bbdf180e1e1193231db5d43b Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 3 Oct 2026 10:08:05 +0200 Subject: Strip outmost constness on infered arguments --- source/common.elna | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'source') diff --git a/source/common.elna b/source/common.elna index e31def8..4579a67 100644 --- a/source/common.elna +++ b/source/common.elna @@ -18,18 +18,14 @@ proc write*(fd: Int; buf: Pointer; Word: Int) -> Int extern proc write_s*(value: []const Word8) -begin - (* fwrite(cast(value.ptr: Pointer), value.length, 1u, stdout) *) write(1, cast(value.ptr: Pointer), cast(value.length: Int)) return proc write_z*(value: ^Word8) -begin write(1, cast(value: Pointer), cast(strlen(value): Int)) return proc write_b*(value: Bool) -begin if value then write_s("true") else @@ -38,7 +34,6 @@ begin return proc write_c*(value: Word8) -begin putchar(cast(value: Int)); fflush(nil) return @@ -68,15 +63,9 @@ begin return proc write_u*(value: Word) -begin write_i(cast(value: Int)) return -proc free_and_nil*(pointer: Pointer) -> Pointer -begin - free(pointer) -return nil - (* Returns true or false depending whether two strings are equal. *) proc string_compare*(lhs_pointer: ^Word8; lhs_length: Word; rhs_pointer: []const Word8) -> Bool var -- cgit v1.2.3