mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 23:13:40 +00:00
cgo: implement struct types
Not complete: packed structs are treated as regular structs.
This commit is contained in:
committed by
Ron Evans
parent
bd8e47af80
commit
684543b7f1
Vendored
+7
@@ -5,6 +5,12 @@ int doCallback(int a, int b, binop_t cb);
|
||||
typedef int * intPointer;
|
||||
void store(int value, int *ptr);
|
||||
|
||||
typedef struct collection {
|
||||
short s;
|
||||
long l;
|
||||
float f;
|
||||
} collection_t;
|
||||
|
||||
// test globals
|
||||
extern int global;
|
||||
extern _Bool globalBool;
|
||||
@@ -14,6 +20,7 @@ extern double globalDouble;
|
||||
extern _Complex float globalComplexFloat;
|
||||
extern _Complex double globalComplexDouble;
|
||||
extern _Complex double globalComplexLongDouble;
|
||||
extern collection_t globalStruct;
|
||||
|
||||
// test duplicate definitions
|
||||
int add(int a, int b);
|
||||
|
||||
Reference in New Issue
Block a user