mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
cgo: add support for enum types
Enum types are implemented as named types (with possible accompanying typedefs as type aliases). The constants inside the enums are treated as Go constants like in the Go toolchain.
This commit is contained in:
committed by
Ron Evans
parent
82dc14b741
commit
dfa713040a
Vendored
+1
@@ -17,6 +17,7 @@ int globalStructSize = sizeof(globalStruct);
|
||||
short globalArray[3] = {5, 6, 7};
|
||||
joined_t globalUnion;
|
||||
int globalUnionSize = sizeof(globalUnion);
|
||||
option_t globalOption = optionG;
|
||||
|
||||
int fortytwo() {
|
||||
return 42;
|
||||
|
||||
Reference in New Issue
Block a user