hare

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

commit 17d9c2036f8edebcf3c066778e08083ee6ddd78f
parent eebbd67e11ce79f6bfccfcf9ded7c73dd6721ec3
Author: Sebastian <sebastian@sebsite.pw>
Date:   Fri, 13 May 2022 22:22:34 -0400

rt::{memcpy,memmove}: make src const

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mrt/memcpy.ha | 4++--
Mrt/memmove.ha | 4++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rt/memcpy.ha b/rt/memcpy.ha @@ -1,8 +1,8 @@ // License: MPL-2.0 // (c) 2021 Drew DeVault <sir@cmpwn.com> -export fn memcpy(dest: *void, src: *void, amt: size) void = { - let a = dest: *[*]u8, b = src: *[*]u8; +export fn memcpy(dest: *void, src: *const void, amt: size) void = { + let a = dest: *[*]u8, b = src: *const [*]u8; for (let i = 0z; i < amt; i += 1) { a[i] = b[i]; }; diff --git a/rt/memmove.ha b/rt/memmove.ha @@ -1,8 +1,8 @@ // License: MPL-2.0 // (c) 2021 Drew DeVault <sir@cmpwn.com> -export fn memmove(dest: *void, src: *void, n: size) void = { - let d = dest: *[*]u8, s = src: *[*]u8; +export fn memmove(dest: *void, src: *const void, n: size) void = { + let d = dest: *[*]u8, s = src: *const [*]u8; if (d: uintptr == s: uintptr) { return; };