summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram/HeaderParser.g
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-14 23:31:42 +0100
committerSven Gothel <[email protected]>2010-11-14 23:31:42 +0100
commitffb589a35abf34f313312617e065b444c5f705b3 (patch)
tree0235e93050ebf5c7885c13b56ec0e435427f5728 /src/java/com/jogamp/gluegen/cgram/HeaderParser.g
parentff239e4eff0bbf28f925a4dffb15638f3dfd51be (diff)
Fix size_t, uintptr_t and uint32_t, uint64_t: suppress 'unsigned' in 'toString()' ; Added type tests.
For size_t and uintptr_t this actually generated invalid C code. Added type tests for those.
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram/HeaderParser.g')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/HeaderParser.g8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/HeaderParser.g b/src/java/com/jogamp/gluegen/cgram/HeaderParser.g
index acb6dde..a0d2a83 100644
--- a/src/java/com/jogamp/gluegen/cgram/HeaderParser.g
+++ b/src/java/com/jogamp/gluegen/cgram/HeaderParser.g
@@ -507,14 +507,14 @@ typeSpecifier[int attributes] returns [Type t] {
| "__int32" { t = new IntType("__int32", SizeThunk.INT, unsigned, cvAttrs); }
| "int32_t" { t = new IntType("int32_t", SizeThunk.INT, false, cvAttrs); /* TS: always signed */ }
| "wchar_t" { t = new IntType("wchar_t", SizeThunk.INT, false, cvAttrs); /* TS: always signed */ }
- | "uint32_t" { t = new IntType("uint32_t", SizeThunk.INT, true, cvAttrs); /* TS: always unsigned */ }
+ | "uint32_t" { t = new IntType("uint32_t", SizeThunk.INT, true, cvAttrs, true); /* TS: always unsigned */ }
| "__int64" { t = new IntType("__int64", SizeThunk.INT64, unsigned, cvAttrs); }
| "int64_t" { t = new IntType("int64_t", SizeThunk.INT64, false, cvAttrs); /* TS: always signed */ }
- | "uint64_t" { t = new IntType("uint64_t", SizeThunk.INT64, true, cvAttrs); /* TS: always unsigned */ }
+ | "uint64_t" { t = new IntType("uint64_t", SizeThunk.INT64, true, cvAttrs, true); /* TS: always unsigned */ }
| "ptrdiff_t" { t = new IntType("ptrdiff_t", SizeThunk.POINTER, false, cvAttrs); /* TS: always signed */ }
| "intptr_t" { t = new IntType("intptr_t", SizeThunk.POINTER, false, cvAttrs); /* TS: always signed */ }
- | "size_t" { t = new IntType("size_t", SizeThunk.POINTER, true, cvAttrs); /* TS: always unsigned */ }
- | "uintptr_t" { t = new IntType("uintptr_t", SizeThunk.POINTER, true, cvAttrs); /* TS: always unsigned */ }
+ | "size_t" { t = new IntType("size_t", SizeThunk.POINTER, true, cvAttrs, true); /* TS: always unsigned */ }
+ | "uintptr_t" { t = new IntType("uintptr_t", SizeThunk.POINTER, true, cvAttrs, true); /* TS: always unsigned */ }
| t = structSpecifier[cvAttrs] ( attributeDecl )*
| t = unionSpecifier [cvAttrs] ( attributeDecl )*
| t = enumSpecifier [cvAttrs]