]> Cypherpunks repositories - gostls13.git/commit
Correct _cgo_free when C ABI does not pass first arg on stack.
authorIan Lance Taylor <iant@golang.org>
Mon, 31 May 2010 05:22:47 +0000 (22:22 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 31 May 2010 05:22:47 +0000 (22:22 -0700)
commit1192c175fe2e82adba91c7485b458e65c6a61e70
treebe01ec2898768fcabed6fd1424ac25746760f202
parenta63f73c196db33f513b71c4ea908d251129b9885
Correct _cgo_free when C ABI does not pass first arg on stack.

It turns out that _cgo_malloc is used, via cmalloc in
runtime/cgocall.c, which is called by code generated by out.go
for the ยท_C_CString function.  I can't find a call to
_cgo_free, but given _cgo_malloc we might as well keep
_cgo_free.  This patch fixes it so that it should work on
amd64.

R=rsc
CC=golang-dev
https://golang.org/cl/1399041
src/cmd/cgo/out.go
src/libcgo/util.c