...
1
2
3
4
5
6
7 package importC
8
9 import "C"
10 import _ "C"
11 import foo "C"
12 import . "C"
13
14
15
16 import "unsafe"
17
18 const _ C.int = 0xff
19
20 type T struct {
21 Name string
22 Ordinal int
23 }
24
25 func _(args []T) {
26 var s string
27 for i, v := range args {
28 cname := C.CString(v.Name)
29 args[i].Ordinal = int(C.sqlite3_bind_parameter_index(s, cname))
30 C.free(unsafe.Pointer(cname))
31 }
32 }
33
34 type CType C.Type
35
36 const _ CType = C.X
37 const _ = C.X
38
39
40
41 func _() {
42 var a [C.ArrayLength]byte
43 _ = a[0]
44 }
45
46
47
48 func _() {
49 var a [C.ArrayLength1]byte
50 _ = 1 / len(a)
51 _ = 1 / cap(a)
52 _ = uint(unsafe.Sizeof(a))
53
54 var b [C.ArrayLength2]byte
55 a = b
56 }
57
View as plain text