mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
cgo: do type checking in CGo testing
Such type checking should hopefully catch more bugs. This commit also fixes some existing type errors.
This commit is contained in:
committed by
Ron Evans
parent
913131bf62
commit
473576e756
Vendored
+4
-4
@@ -92,16 +92,16 @@ var (
|
||||
|
||||
// Arrays.
|
||||
_ C.myIntArray
|
||||
_ C.myIntArrayPtr
|
||||
)
|
||||
|
||||
// Test bitfield accesses.
|
||||
func foo() {
|
||||
var x C.bitfield_t
|
||||
x.start = 3
|
||||
x.a = 4
|
||||
x.b = 1
|
||||
x.c = 2
|
||||
x.set_bitfield_a(4)
|
||||
x.set_bitfield_b(1)
|
||||
x.set_bitfield_c(2)
|
||||
x.d = 10
|
||||
x.e = 5
|
||||
var _ C.uchar = x.bitfield_a()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user