Minimize code duplication in core:mem by using the base:runtime calls

This commit is contained in:
gingerBill
2024-04-03 11:47:39 +01:00
parent e42b16b106
commit 5fe0788cff
2 changed files with 17 additions and 50 deletions
+2
View File
@@ -45,6 +45,8 @@ copy_non_overlapping :: proc "contextless" (dst, src: rawptr, len: int) -> rawpt
intrinsics.mem_copy_non_overlapping(dst, src, len)
return dst
}
@(require_results)
compare :: proc "contextless" (a, b: []byte) -> int {
res := compare_byte_ptrs(raw_data(a), raw_data(b), min(len(a), len(b)))
if res == 0 && len(a) != len(b) {