cgo: include all enums in the CGo Go AST

Not all enums may be used as a type anywhere, which was previously the
only way to include an enum in the AST. This commit makes sure all enums
are included.
This commit is contained in:
Ayke van Laethem
2019-11-06 12:08:31 +01:00
committed by Ron Evans
parent d31deda1b5
commit 76c9f13e13
3 changed files with 10 additions and 0 deletions
+3
View File
@@ -38,6 +38,9 @@ typedef enum option {
optionF,
optionG,
} option_t;
enum unused {
unused1 = 5,
};
// Anonymous enum.
typedef enum {
+2
View File
@@ -12,6 +12,7 @@ const C.optionD = -4
const C.optionE = 10
const C.optionF = 11
const C.optionG = 12
const C.unused1 = 5
type C.int16_t = int16
type C.int32_t = int32
@@ -81,3 +82,4 @@ type C.struct_type1 struct {
}
type C.struct_type2 struct{ _type C.int }
type C.enum_option C.int
type C.enum_unused C.uint