cgo: improve typedef/struct/enum support

Typedefs are now Go type aliases. And C.struct_ and C.union_ prefixed
records work correctly now, even when they're not in a typedef.
This commit is contained in:
Ayke van Laethem
2019-04-27 23:06:45 +02:00
committed by Ron Evans
parent 4bd1b9e53d
commit 35af33ead7
5 changed files with 88 additions and 64 deletions
+5
View File
@@ -15,6 +15,11 @@ typedef struct collection {
unsigned char c;
} collection_t;
struct point {
int x;
int y;
};
// linked list
typedef struct list_t {
int n;