summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/cgram
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp/gluegen/cgram')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/IntType.java5
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/PointerType.java7
2 files changed, 12 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/IntType.java b/src/java/com/jogamp/gluegen/cgram/types/IntType.java
index ffc5696..6eeb997 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/IntType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/IntType.java
@@ -82,6 +82,11 @@ public class IntType extends PrimitiveType implements Cloneable {
return unsigned;
}
+ /** Indicates whether this type is an unsigned primitive type, as opposed to a typedef type that's unsigned. */
+ public boolean isPrimitiveUnsigned() {
+ return unsigned && !typedefedUnsigned;
+ }
+
@Override
public String toString() {
return getCVAttributesString() + ((isUnsigned() & (!typedefedUnsigned)) ? "unsigned " : "") + getName();
diff --git a/src/java/com/jogamp/gluegen/cgram/types/PointerType.java b/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
index 4922d28..f4811c7 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/PointerType.java
@@ -120,6 +120,13 @@ public class PointerType extends Type implements Cloneable {
return targetType;
}
+ public Type getLastTargetType() {
+ if(targetType.isPointer())
+ return ((PointerType)targetType).getLastTargetType();
+ else
+ return targetType;
+ }
+
@Override
public boolean isFunctionPointer() {
return targetType.isFunction();