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:
Ayke van Laethem
2019-05-16 22:16:58 +02:00
committed by Ron Evans
parent 82dc14b741
commit dfa713040a
7 changed files with 159 additions and 0 deletions
+1
View File
@@ -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;