1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00
go/misc/cgo
Keith Randall b868616b63 cmd/cgo: special case C ptr types to use uintptr
Some C types are declared as pointers, but C code
stores non-pointers in them.  When the Go garbage
collector sees such a pointer, it gets unhappy.

Instead, for these types represent them on the Go
side with uintptr.

We need this change to handle Apple's CoreFoundation
CF*Ref types. Users of these types might need to
update their code like we do in root_cgo_darwin.go.
The only change that is required under normal
circumstances is converting some nils to 0.
A go fix module is provided to help.

Fixes #21897

RELNOTE=yes

Change-Id: I9716cfb255dc918792625f42952aa171cd31ec1b
Reviewed-on: https://go-review.googlesource.com/66332
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-11-17 22:11:03 +00:00
..
errors cmd/compile: record original and absolute file names for line directives 2017-11-13 16:47:41 +00:00
fortran *.bash: always use the same string equality operator 2017-03-14 21:46:31 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life test/run: use go tool compile + link instead of go run when possible 2017-10-31 13:21:05 +00:00
nocgo
stdio test/run: use go tool compile + link instead of go run when possible 2017-10-31 13:21:05 +00:00
test cmd/cgo: special case C ptr types to use uintptr 2017-11-17 22:11:03 +00:00
testasan
testcarchive cmd/go: do not install dependencies during "go install" 2017-11-03 22:09:46 +00:00
testcshared cmd/go: do not install dependencies during "go install" 2017-11-03 22:09:46 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin cmd/go: cache successful test results 2017-11-03 22:07:55 +00:00
testsanitizers misc/cgo/testsanitizers: convert test.bash to Go 2017-08-17 15:05:08 +00:00
testshared all: change github.com issue links to golang.org 2017-11-04 04:13:41 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso
testsovar
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00