cl: initLinkname support //llgo:link

This commit is contained in:
xushiwei
2024-05-07 15:35:37 +08:00
parent 1038b06510
commit c93fce87da
5 changed files with 62 additions and 33 deletions

2
c/c.go
View File

@@ -44,7 +44,7 @@ func Str(string) *Char
func Advance(ptr Pointer, offset int) Pointer
// llgo:link Index llgo.index
// func Index[T any, I integer](ptr *T, offset I) T { return *ptr }
func Index[T any, I integer](ptr *T, offset I) T { return *ptr }
//go:linkname Alloca llgo.alloca
func Alloca(size uintptr) Pointer