foreign import x {"foo.lib", "bar.lib"}

This commit is contained in:
gingerBill
2018-07-29 20:56:09 +01:00
parent dc5da7933a
commit a6fe656f21
7 changed files with 97 additions and 55 deletions
+4
View File
@@ -69,6 +69,10 @@ compare_byte_ptrs :: proc "contextless" (a, b: ^byte, n: int) -> int {
return 0;
}
compare_ptrs :: inline proc "contextless" (a, b: rawptr, n: int) -> int {
return compare_byte_ptrs((^byte)(a), (^byte)(b), n);
}
ptr_offset :: proc "contextless" (ptr: $P/^$T, n: int) -> P {
new := int(uintptr(ptr)) + size_of(T)*n;
return P(uintptr(new));