From 51bf41009e85377514cc91c6d3e9f4fa6b1635cb Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Mon, 16 Sep 2024 23:37:22 +0800 Subject: [PATCH] c:realloc --- c/c.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/c.go b/c/c.go index ca6d63d5..c36d90ac 100644 --- a/c/c.go +++ b/c/c.go @@ -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