From eec3f21c3597ff9bf9760a06e00dd341214ea90d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 18 Jun 2023 03:26:11 +0200 Subject: GlueGen Struct [9]: Fix regression which added a pointer referencing type 'void', i.e. exclude if !baseCElemType.hasSize() // like 'void*' -> 'void' --- src/java/com/jogamp/gluegen/JavaEmitter.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/java/com/jogamp') 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 { -- cgit v1.2.3