aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-10-12 17:09:54 -0700
committerIan Lance Taylor <iant@golang.org>2016-10-13 16:41:06 +0000
commit3c1e1c30fdfbdaf7cf5f947c53245f1c28e56f91 (patch)
tree4ac6a449a7db1070b75ddaae28012544832324fd /src/encoding
parentdc46b882d583a32c7de37a7cfa8b423eb58d0296 (diff)
downloadgo-3c1e1c30fdfbdaf7cf5f947c53245f1c28e56f91.tar.xz
cmd/cgo: use alias for unsafe rather than separate functions
When we need to generate a call to _cgoCheckPointer, we need to type assert the result back to the desired type. That is harder when the type is unsafe.Pointer, as the package can have values of unsafe.Pointer types without actually importing unsafe, by mixing C void* and :=. We used to handle this by generating a special function for each needed type, and defining that function in a separate file where we did import unsafe. Simplify the code by not generating those functions, but instead just import unsafe under the alias _cgo_unsafe. This is a simplification step toward a fix for issue #16591. Change-Id: I0edb3e04b6400ca068751709fe063397cf960a54 Reviewed-on: https://go-review.googlesource.com/30973 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions