home: hub: hare-crc32

Download patch

ref: 0c33bde5b462f99eb2621bcca0efe5298580c5b6
parent: 8418b4ced569104595f343e6f762a3ab60db2c3a
author: grobe0ba <grobe0ba@tcp80.org>
date: Sat Nov 25 06:33:05 CST 2023

update for newer hare

--- a/crc.ha
+++ b/crc.ha
@@ -13,6 +13,7 @@
 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 use strings;
+use types::c;
 
 export fn crc32(crc: u32, inbuf: []u8) u32 = {
 	crc = crc ^ ~0;
@@ -26,7 +27,7 @@
 
 @test fn crc32() void = {
 	const ts: str = "harelang";
-	const tc: *char = strings::to_c(ts);
+	const tc: *c::char = c::fromstr(ts);
 	defer free(tc);
 	const ta = (tc: *[*]u8)[..len(ts)];