diff options
author | Sven Gothel <[email protected]> | 2023-06-18 03:26:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-18 03:26:11 +0200 |
commit | eec3f21c3597ff9bf9760a06e00dd341214ea90d (patch) | |
tree | 1cf2674da5311bd50bbad733493cd9e6378b7c44 | |
parent | 0e90617503c71eedba05b604d4b35ca2d14928ec (diff) |
GlueGen Struct [9]: Fix regression which added a pointer referencing type 'void', i.e. exclude if !baseCElemType.hasSize() // like 'void*' -> 'void'
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index f4edbee..0b30b20 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -1632,6 +1632,14 @@ public class JavaEmitter implements GlueEmitter { System.err.printf("SE.ac.%02d: baseCType %s%n", (i+1), baseCElemType.getDebugString()); } + if( !baseCElemType.hasSize() ) { // like 'void*' -> 'void' + final String msg = "SKIP unsized field in struct: "+returnSizeLookupName+": fieldType "+fieldType.getSignature(null).toString()+", baseType "+baseCElemType.getSignature(null).toString(); + unit.emitln(" // "+msg); + unit.emitln(); + LOG.log(WARNING, structCType.getASTLocusTag(), msg); + return; + } + isPrimitive = baseCElemType.isPrimitive(); isConstValue = baseCElemType.isConst(); try { |