diff options
author | Sven Gothel <[email protected]> | 2011-07-17 19:55:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-07-17 19:55:36 +0200 |
commit | 8fc841257cae6b49399b29dfa53e3e834d27cabb (patch) | |
tree | 5012bb4ec63378017479d51e65262974a545645e /src/java/com/jogamp/gluegen/cgram/HeaderParser.g | |
parent | 2bf03e9814477b412f9533d3ba3f4c597892501e (diff) |
GlueGen: Alignment Cleanup ..
- SizeThunk
- rename: compute -> computeSize
- add: computeAlignment
- merge types: char -> int8, short -> int16
- 'int' and 'long' may differ
-
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram/HeaderParser.g')
-rw-r--r-- | src/java/com/jogamp/gluegen/cgram/HeaderParser.g | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/HeaderParser.g b/src/java/com/jogamp/gluegen/cgram/HeaderParser.g index 79f966f..8c2ad26 100644 --- a/src/java/com/jogamp/gluegen/cgram/HeaderParser.g +++ b/src/java/com/jogamp/gluegen/cgram/HeaderParser.g @@ -334,7 +334,7 @@ options { // 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); + enumType = new EnumType(enumTypeName, SizeThunk.INT32); } return enumType; @@ -464,7 +464,7 @@ declSpecifiers returns [TypeBox tb] { { if (t == null && (x & (SIGNED | UNSIGNED)) != 0) { - t = new IntType("int", SizeThunk.INT, ((x & UNSIGNED) != 0), attrs2CVAttrs(x)); + t = new IntType("int", SizeThunk.INTxx, ((x & UNSIGNED) != 0), attrs2CVAttrs(x)); } tb = new TypeBox(t, ((x & TYPEDEF) != 0)); } @@ -498,9 +498,9 @@ typeSpecifier[int attributes] returns [Type t] { boolean unsigned = ((attributes & UNSIGNED) != 0); } : "void" { t = new VoidType(cvAttrs); } - | "char" { t = new IntType("char" , SizeThunk.CHAR, unsigned, cvAttrs); } - | "short" { t = new IntType("short", SizeThunk.SHORT, unsigned, cvAttrs); } - | "int" { t = new IntType("int" , SizeThunk.INT, unsigned, cvAttrs); } + | "char" { t = new IntType("char" , SizeThunk.INT8, unsigned, cvAttrs); } + | "short" { t = new IntType("short", SizeThunk.INT16, unsigned, cvAttrs); } + | "int" { t = new IntType("int" , SizeThunk.INTxx, unsigned, cvAttrs); } | "long" { t = new IntType("long" , SizeThunk.LONG, unsigned, cvAttrs); } | "float" { t = new FloatType("float", SizeThunk.FLOAT, cvAttrs); } | "double" { t = new DoubleType("double", SizeThunk.DOUBLE, cvAttrs); } @@ -593,7 +593,7 @@ specifierQualifierList returns [Type t] { )+ { if (t == null && (x & (SIGNED | UNSIGNED)) != 0) { - t = new IntType("int", SizeThunk.INT, ((x & UNSIGNED) != 0), attrs2CVAttrs(x)); + t = new IntType("int", SizeThunk.INTxx, ((x & UNSIGNED) != 0), attrs2CVAttrs(x)); } } ; |