From 0e90617503c71eedba05b604d4b35ca2d14928ec Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 18 Jun 2023 03:23:23 +0200 Subject: Type: Add hasSize(), change getSignature(..) for const: isConstTypedef() -> "typedef", isConstRaw() -> "native" --- src/java/com/jogamp/gluegen/cgram/types/Type.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/com/jogamp/gluegen/cgram/types/Type.java b/src/java/com/jogamp/gluegen/cgram/types/Type.java index 2c32235..7ff1fed 100644 --- a/src/java/com/jogamp/gluegen/cgram/types/Type.java +++ b/src/java/com/jogamp/gluegen/cgram/types/Type.java @@ -215,10 +215,10 @@ public abstract class Type implements SemanticEqualityOp, ASTLocusTagProvider { append(sb, "const[", prepComma); prepComma=false; { if( isConstTypedef() ) { - append(sb, "type ", prepComma); prepComma=true; + append(sb, "typedef", prepComma); prepComma=true; } if( isConstRaw() ) { - append(sb, "inst -> ", prepComma); prepComma=false; + append(sb, "native", prepComma); prepComma=true; } if( isConst() ) { append(sb, "true]", prepComma); @@ -343,6 +343,9 @@ public abstract class Type implements SemanticEqualityOp, ASTLocusTagProvider { return isTypedef; } + /** Returns true if {@link #getSize()} is not null, otherwise false. */ + public final boolean hasSize() { return null != size; } + /** SizeThunk which computes size of this type in bytes. */ public final SizeThunk getSize() { return size; } /** Size of this type in bytes according to the given MachineDataInfo. */ -- cgit v1.2.3