Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,17 @@
package main
import "core:fmt"
foreign import libc "system:c"
@(default_calling_convention="c")
foreign libc {
@(link_name="strdup") cstrdup :: proc(_: cstring) -> cstring ---
@(link_name="free") cfree :: proc(_: rawptr) ---
}
main :: proc() {
s1 : cstring = "hello"
s2 := cstrdup(s1)
fmt.printf("{}\n", s2)
cfree(rawptr(s2))