internal/unsafe: get rid of GoString

The only users were GOOS=windows code, which can use
golang.org/x/sys/windows.BytePtrToString instead.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-11 11:13:49 +01:00
parent 884e7d27e2
commit 5894127204
4 changed files with 2 additions and 36 deletions
+1 -2
View File
@@ -11,7 +11,6 @@ import (
syscall "golang.org/x/sys/windows"
"gioui.org/internal/gl"
gunsafe "gioui.org/internal/unsafe"
)
type (
@@ -154,7 +153,7 @@ func eglTerminate(disp _EGLDisplay) bool {
func eglQueryString(disp _EGLDisplay, name _EGLint) string {
r, _, _ := _eglQueryString.Call(uintptr(disp), uintptr(name))
return gunsafe.GoString(gunsafe.SliceOf(r))
return syscall.BytePtrToString((*byte)(unsafe.Pointer(r)))
}
// issue34474KeepAlive calls runtime.KeepAlive as a