1
0
mirror of https://github.com/golang/go synced 2024-11-06 06:26:13 -07:00
go/misc/cgo/test/testdata/issue27054/test27054.go
Elias Naur 7dbbb5bacf 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>
2020-05-31 09:48:08 +00:00

22 lines
393 B
Go

// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package issue27054
/*
#include "egl.h"
*/
import "C"
import (
"testing"
)
func Test27054(t *testing.T) {
var (
// Note: 0, not nil. That makes sure we use uintptr for these types.
_ C.EGLDisplay = 0
_ C.EGLConfig = 0
)
}