aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fix/egltype.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/fix/egltype.go')
-rw-r--r--src/cmd/fix/egltype.go28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/cmd/fix/egltype.go b/src/cmd/fix/egltype.go
index c8c4f03e97..cb0f7a73de 100644
--- a/src/cmd/fix/egltype.go
+++ b/src/cmd/fix/egltype.go
@@ -9,13 +9,14 @@ import (
)
func init() {
- register(eglFix)
+ register(eglFixDisplay)
+ register(eglFixConfig)
}
-var eglFix = fix{
+var eglFixDisplay = fix{
name: "egl",
date: "2018-12-15",
- f: eglfix,
+ f: eglfixDisp,
desc: `Fixes initializers of EGLDisplay`,
disabled: false,
}
@@ -25,8 +26,27 @@ var eglFix = fix{
// New state:
// type EGLDisplay uintptr
// This fix finds nils initializing these types and replaces the nils with 0s.
-func eglfix(f *ast.File) bool {
+func eglfixDisp(f *ast.File) bool {
return typefix(f, func(s string) bool {
return s == "C.EGLDisplay"
})
}
+
+var eglFixConfig = fix{
+ name: "eglconf",
+ date: "2020-05-30",
+ f: eglfixConfig,
+ desc: `Fixes initializers of EGLConfig`,
+ disabled: false,
+}
+
+// Old state:
+// type EGLConfig unsafe.Pointer
+// New state:
+// type EGLConfig uintptr
+// This fix finds nils initializing these types and replaces the nils with 0s.
+func eglfixConfig(f *ast.File) bool {
+ return typefix(f, func(s string) bool {
+ return s == "C.EGLConfig"
+ })
+}