c:realloc

This commit is contained in:
luoliwoshang
2024-09-16 23:37:22 +08:00
parent 9f8b9ea806
commit 51bf41009e

3
c/c.go
View File

@@ -85,6 +85,9 @@ func Calloc(num uintptr, size uintptr) Pointer
//go:linkname Free C.free
func Free(ptr Pointer)
//go:linkname Realloc C.realloc
func Realloc(ptr Pointer, size uintptr) Pointer
//go:linkname Memcpy C.memcpy
func Memcpy(dst, src Pointer, n uintptr) Pointer