summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/GlueGen.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-03-07 08:25:36 +0100
committerSven Gothel <[email protected]>2015-03-07 08:25:36 +0100
commiteca019cdea4017227e951d8a9eb30cb34fca4a07 (patch)
tree214e4837e6f448873c03c886adb2ccf2af7782ab /src/java/com/jogamp/gluegen/GlueGen.java
parent6a0822b03de2976c5bc37544c50e70094eeb94a7 (diff)
Bug 1134 - Pass ASTLocationTag to all types, used for GlueGenException
Enhances semantic exception in code generation by adding the AST location of the type or function declaration.
Diffstat (limited to 'src/java/com/jogamp/gluegen/GlueGen.java')
-rw-r--r--src/java/com/jogamp/gluegen/GlueGen.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/GlueGen.java b/src/java/com/jogamp/gluegen/GlueGen.java
index 2833154..4ef5648 100644
--- a/src/java/com/jogamp/gluegen/GlueGen.java
+++ b/src/java/com/jogamp/gluegen/GlueGen.java
@@ -73,6 +73,8 @@ public class GlueGen implements GlueEmitterControls {
private static Level logLevel = null;
+ public static void setDebug(final boolean v) { debug=v; }
+ public static void setLogLevel(final Level l) { logLevel=l; }
public static boolean debug() { return debug; }
@Override
@@ -330,12 +332,12 @@ public class GlueGen implements GlueEmitterControls {
for (final Iterator<Type> iter = referencedStructs.results(); iter.hasNext();) {
final Type t = iter.next();
if (t.isCompound()) {
- assert t.hasTypedefName() && t.getName() == null : "ReferencedStructs incorrectly recorded compound type " + t;
+ assert t.isTypedef() && t.getName() == null : "ReferencedStructs incorrectly recorded compound type " + t;
emit.emitStruct(t.asCompound(), null);
} else if (t.isPointer()) {
final PointerType p = t.asPointer();
final CompoundType c = p.getTargetType().asCompound();
- assert p.hasTypedefName() && c.getName() == null : "ReferencedStructs incorrectly recorded pointer type " + p;
+ assert p.isTypedef() && c.getName() == null : "ReferencedStructs incorrectly recorded pointer type " + p;
emit.emitStruct(c, p);
}
}