diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-03 10:08:05 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-03 10:08:05 +0200 |
| commit | 5d808dd4c4003968bbdf180e1e1193231db5d43b (patch) | |
| tree | 6391fc8990790288e76dc8eb6ff7b1a6872dab26 /source/common.elna | |
| parent | 2ea84997ae37517729c3c8ed3af8a000bdc632df (diff) | |
| download | elna-5d808dd4c4003968bbdf180e1e1193231db5d43b.tar.gz | |
Strip outmost constness on infered arguments
Diffstat (limited to 'source/common.elna')
| -rw-r--r-- | source/common.elna | 11 |
1 files changed, 0 insertions, 11 deletions
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 |
