1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| // 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 main
|
| import (
| "go/ast"
| )
|
| func init() {
| register(eglFix)
| }
|
| var eglFix = fix{
| name: "egl",
| date: "2018-12-15",
| f: eglfix,
| desc: `Fixes initializers of EGLDisplay`,
| disabled: false,
| }
|
| // Old state:
| // type EGLDisplay unsafe.Pointer
| // New state:
| // type EGLDisplay uintptr
| // This fix finds nils initializing these types and replaces the nils with 0s.
| func eglfix(f *ast.File) bool {
| return typefix(f, func(s string) bool {
| return s == "C.EGLDisplay"
| })
| }
|
|