mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
cgo: implement C.struct_ types
These types (called elaborated types in C) are used as part of linked lists, among others. This is part an extra feature (to be compatible with CGo C.struct_ types) and part a bugfix: linked lists would result in endless recursion leading to a stack overflow.
This commit is contained in:
committed by
Ron Evans
parent
b716cf1afd
commit
21a4c14e86
Vendored
+6
@@ -12,6 +12,12 @@ typedef struct collection {
|
||||
unsigned char c;
|
||||
} collection_t;
|
||||
|
||||
// linked list
|
||||
typedef struct list_t {
|
||||
int n;
|
||||
struct list_t *next;
|
||||
} list_t;
|
||||
|
||||
typedef union joined {
|
||||
myint s;
|
||||
float f;
|
||||
|
||||
Reference in New Issue
Block a user