Source file
src/cmd/fix/jnitype.go
1
2
3
4
5 package main
6
7 import (
8 "go/ast"
9 )
10
11 func init() {
12 register(jniFix)
13 }
14
15 var jniFix = fix{
16 name: "jni",
17 date: "2017-12-04",
18 f: jnifix,
19 desc: `Fixes initializers of JNI's jobject and subtypes`,
20 disabled: false,
21 }
22
23
24
25
26
27
28
29 func jnifix(f *ast.File) bool {
30 return typefix(f, func(s string) bool {
31 switch s {
32 case "C.jobject":
33 return true
34 case "C.jclass":
35 return true
36 case "C.jthrowable":
37 return true
38 case "C.jstring":
39 return true
40 case "C.jarray":
41 return true
42 case "C.jbooleanArray":
43 return true
44 case "C.jbyteArray":
45 return true
46 case "C.jcharArray":
47 return true
48 case "C.jshortArray":
49 return true
50 case "C.jintArray":
51 return true
52 case "C.jlongArray":
53 return true
54 case "C.jfloatArray":
55 return true
56 case "C.jdoubleArray":
57 return true
58 case "C.jobjectArray":
59 return true
60 case "C.jweak":
61 return true
62 }
63 return false
64 })
65 }
66
View as plain text