cmd/cgo: add C.CBytes
Add a C.CBytes function to copy a Go byte slice into C memory. This returns an unsafe.Pointer, since that is what needs to be passed to C.free, and the data is often opaque bytes anyway. Fixes #14838 Change-Id: Ic7bc29637eb6f1f5ee409b3898c702a59833a85a Reviewed-on: https://go-review.googlesource.com/20762Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
misc/cgo/test/issue14838.go
0 → 100644
Please register or sign in to comment