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 /misc | |
parent | f1f8f9af9a55d73dfc6603a93bee0559fdc9024d (diff) | |
download | go-7dbbb5bacf4e52bc4efbd3caecdebf6ffb730783.tar.gz go-7dbbb5bacf4e52bc4efbd3caecdebf6ffb730783.zip |
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 'misc')
-rw-r--r-- | misc/cgo/test/testdata/issue27054/egl.h | 1 | ||||
-rw-r--r-- | misc/cgo/test/testdata/issue27054/test27054.go | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/misc/cgo/test/testdata/issue27054/egl.h b/misc/cgo/test/testdata/issue27054/egl.h index 33a759ea2a..30796273e8 100644 --- a/misc/cgo/test/testdata/issue27054/egl.h +++ b/misc/cgo/test/testdata/issue27054/egl.h @@ -5,3 +5,4 @@ // This is the relevant part of EGL/egl.h. typedef void *EGLDisplay; +typedef void *EGLConfig; diff --git a/misc/cgo/test/testdata/issue27054/test27054.go b/misc/cgo/test/testdata/issue27054/test27054.go index 186f5bd602..01bf43a913 100644 --- a/misc/cgo/test/testdata/issue27054/test27054.go +++ b/misc/cgo/test/testdata/issue27054/test27054.go @@ -13,5 +13,9 @@ import ( ) func Test27054(t *testing.T) { - var _ C.EGLDisplay = 0 // Note: 0, not nil. That makes sure we use uintptr for this type. + var ( + // Note: 0, not nil. That makes sure we use uintptr for these types. + _ C.EGLDisplay = 0 + _ C.EGLConfig = 0 + ) } |