Merge pull request #797 from luoliwoshang/c/realloc

c:realloc
This commit is contained in:
xushiwei
2024-09-17 08:40:05 +08:00
committed by GitHub

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