diff options
Diffstat (limited to 'src/classes/com/sun/gluegen/cgram')
-rw-r--r-- | src/classes/com/sun/gluegen/cgram/HeaderParser.g | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/classes/com/sun/gluegen/cgram/HeaderParser.g b/src/classes/com/sun/gluegen/cgram/HeaderParser.g index 78ba5c54a..a9da6635c 100644 --- a/src/classes/com/sun/gluegen/cgram/HeaderParser.g +++ b/src/classes/com/sun/gluegen/cgram/HeaderParser.g @@ -289,7 +289,12 @@ options { } if (enumType == null) { - enumType = new EnumType(enumTypeName, SizeThunk.LONG); + // This isn't quite correct. In theory the enum should expand to + // the size of the largest element, so if there were a long long + // entry the enum should expand to e.g. int64. However, using + // "long" here (which is what used to be the case) was + // definitely incorrect and caused problems. + enumType = new EnumType(enumTypeName, SizeThunk.INT); } return enumType; |