From: Elias Naur Date: Wed, 19 Dec 2018 12:50:13 +0000 (+0100) Subject: cmd/cgo,doc/go1.12.html: document breaking EGLDisplay change X-Git-Tag: go1.12beta2~116 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d902f23ec416fc881d567c1a81a3d2c48cc16855;p=gostls13.git cmd/cgo,doc/go1.12.html: document breaking EGLDisplay change Change-Id: I3c8ba5fdb05b6b1324648622656cc10071c70a34 Reviewed-on: https://go-review.googlesource.com/c/154997 Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go1.12.html b/doc/go1.12.html index f0957eeb7e..2b64adffef 100644 --- a/doc/go1.12.html +++ b/doc/go1.12.html @@ -135,6 +135,16 @@ Do not send CLs removing the interior tags from such phrases. Go 1.12 is the last release that will support binary-only packages.

+

Cgo

+ +

+ Go 1.12 will translate the C type EGLDisplay to the Go type uintptr. + This change is similar to how Go 1.10 and newer treats Darwin's CoreFoundation + and Java's JNI types. See the + cgo documentation + for more information. +

+

Modules

diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 08d64130df..cceb33edbd 100644 --- a/src/cmd/cgo/doc.go +++ b/src/cmd/cgo/doc.go @@ -413,6 +413,8 @@ type in Go are instead represented by a uintptr. Those include: jobjectArray jweak +3. The EGLDisplay type 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 pointers but data structures encoded in a pointer type. All operations @@ -427,6 +429,11 @@ 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 +to auto-update code from Go 1.11 and earlier: + + go tool fix -r egl + Using cgo directly Usage: