summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-25 07:45:56 +0200
committerSven Gothel <[email protected]>2023-06-25 07:45:56 +0200
commit42a1f8c8bdb34242f422d24c4ad1d67a1e7ffd25 (patch)
treedcd6ed0ee43790ba34f7dd94383673ba3d61688d /src/java
parentfd1c691c2e11e1dcfc6f84143e5152c5cd14b45b (diff)
GlueGen: Fix Type.getSignature(..): Test for isFunctionPointer() to elaborate on FunctionType as getTargetType() only retruns a function-ptr and no more a function-type.
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/jogamp/gluegen/cgram/types/Type.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/java/com/jogamp/gluegen/cgram/types/Type.java b/src/java/com/jogamp/gluegen/cgram/types/Type.java
index ae377dc..aa7f845 100644
--- a/src/java/com/jogamp/gluegen/cgram/types/Type.java
+++ b/src/java/com/jogamp/gluegen/cgram/types/Type.java
@@ -184,15 +184,18 @@ public abstract class Type implements SemanticEqualityOp, ASTLocusTagProvider {
} else {
sb.append("ANON");
}
- final Type targetType = getTargetType();
- if( null != targetType && this != targetType ) {
+ if ( isFunctionPointer() ) {
sb.append(" -> ");
- if (!targetType.isFunction()) {
+ final FunctionType ft = getTargetFunction();
+ sb.append(ft.toString(null /* functionName */, null /* callingConvention */, false, true));
+ } else {
+ final Type targetType = getTargetType();
+ if( null != targetType && this != targetType ) {
+ sb.append(" -> ");
sb.append("(" + targetType.toString() + ") * " + getCVAttributesString());
- } else {
- sb.append(((FunctionType) targetType).toString(null /* functionName */, null /* callingConvention */, false, true));
}
}
+
if( GlueGen.debug() ) {
sb.append(", o=0x"+Integer.toHexString(objHash()));
}
@@ -594,7 +597,7 @@ public abstract class Type implements SemanticEqualityOp, ASTLocusTagProvider {
* If this is an array or pointer method returns the next target element type, otherwise `this`.
* </p>
* <p>
- * In this is a {@link #isFunctionPointer()} type, `this` function {#link PointerType} is returned.
+ * In this is a {@link #isFunctionPointer()} type, `this` function {@link PointerType} is returned.
* </p>
* @see #getBaseType()
* @see #getTargetFunction()