cgo: refactor

This is a large refactor of the cgo package. It should fix a number of
smaller problems and be a bit more strict (like upstream CGo): it for
example requires every Go file in a package to include the header files
it needs instead of piggybacking on imports in earlier files.

The main benefit is that it should be a bit more maintainable and easier
to add new features in the future (like static functions).

This breaks the tinygo.org/x/bluetooth package, which should be updated
before this change lands.
This commit is contained in:
Ayke van Laethem
2022-02-20 19:54:52 +01:00
committed by Ron Evans
parent 1d2c39c3b9
commit 5afb63df60
9 changed files with 925 additions and 945 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ import "C"
//line errors.go:100
var (
// constant too large
_ C.uint8_t = 2 << 10
_ C.char = 2 << 10
// z member does not exist
_ C.point_t = C.point_t{z: 3}