diff options
| author | Elias Naur <mail@eliasnaur.com> | 2020-05-30 16:34:23 +0200 |
|---|---|---|
| committer | Elias Naur <mail@eliasnaur.com> | 2020-05-31 09:48:08 +0000 |
| commit | 7dbbb5bacf4e52bc4efbd3caecdebf6ffb730783 (patch) | |
| tree | bb6090928a3dba49285dc1dca025b9f09c321cba /src/cmd/cgo/doc.go | |
| parent | f1f8f9af9a55d73dfc6603a93bee0559fdc9024d (diff) | |
| download | go-7dbbb5bacf4e52bc4efbd3caecdebf6ffb730783.tar.xz | |
cmd/cgo,cmd/fix,misc/cgo: map the EGLConfig C type to uintptr in Go
Similarly to EGLDisplay, EGLConfig is declared as a pointer but may
contain non-pointer values.
I believe this is the root cause of https://todo.sr.ht/~eliasnaur/gio/121.
Change-Id: I412c4fbc2eef4aa028534d68bda95db98e3a365d
Reviewed-on: https://go-review.googlesource.com/c/go/+/235817
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/cgo/doc.go')
| -rw-r--r-- | src/cmd/cgo/doc.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 8c3bf81bf7..4366df4b55 100644 --- a/src/cmd/cgo/doc.go +++ b/src/cmd/cgo/doc.go @@ -413,7 +413,7 @@ type in Go are instead represented by a uintptr. Those include: jobjectArray jweak -3. The EGLDisplay type from the EGL API. +3. The EGLDisplay and EGLConfig types from the EGL API. These types are uintptr on the Go side because they would otherwise confuse the Go garbage collector; they are sometimes not really @@ -429,11 +429,16 @@ from Go 1.9 and earlier, use the cftype or jni rewrites in the Go fix tool: It will replace nil with 0 in the appropriate places. -The EGLDisplay case were introduced in Go 1.12. Use the egl rewrite +The EGLDisplay case was introduced in Go 1.12. Use the egl rewrite to auto-update code from Go 1.11 and earlier: go tool fix -r egl <pkg> +The EGLConfig case was introduced in Go 1.15. Use the eglconf rewrite +to auto-update code from Go 1.14 and earlier: + + go tool fix -r eglconf <pkg> + Using cgo directly Usage: |
