diff options
author | Sven Gothel <[email protected]> | 2023-06-20 11:24:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-20 11:24:12 +0200 |
commit | 65e9c14e1566d5bfa88435d460c699c2a8fd23b7 (patch) | |
tree | 1a906a84fec2466c23c6bba0a530e5a7a8701c4b /src/java/com/jogamp/gluegen | |
parent | b9dc722d689760bf85628edd8766dc6cd2360c8e (diff) |
GlueGen Struct [15b]: FunctionPointer: Drop is<FuncName>Null() -> use get<FuncName>()
Diffstat (limited to 'src/java/com/jogamp/gluegen')
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 23aae96..cc86cac 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -1098,15 +1098,8 @@ public class JavaEmitter implements GlueEmitter { if ( fieldType.isFunctionPointer() && !isOpaqueField ) { final FunctionSymbol func = new FunctionSymbol(field.getName(), fieldType.asPointer().getTargetType().asFunction()); func.rename(renamed); // null is OK - generateFunctionPointerCode(methodBindingSet, javaUnit, jniUnit, structCTypeName, - containingCType, containingJType, i, func, fqStructFieldName1); final String javaTypeName = "long"; final String capFieldName = capitalizeString(fieldName); - generateIsNullSignature(javaUnit, false, fieldName, fieldType, Ownership.Parent, capFieldName, false, false, null); - javaUnit.emitln(" {"); - javaUnit.emitln(" return 0 == accessor.getLongAt(" + fieldName+"_offset[mdIdx], md.pointerSizeInBytes());"); - javaUnit.emitln(" }"); - javaUnit.emitln(); if( !immutableField && !fieldType.isConst() ) { // Setter generateSetterSignature(javaUnit, MethodAccess.PUBLIC, false, false, fieldName, fieldType, Ownership.Parent, containingJTypeName, capFieldName, null, javaTypeName, null, false, false, null, null, null); @@ -1122,6 +1115,8 @@ public class JavaEmitter implements GlueEmitter { javaUnit.emitln(" return accessor.getLongAt(" + fieldName+"_offset[mdIdx], md.pointerSizeInBytes());"); javaUnit.emitln(" }"); javaUnit.emitln(); + generateFunctionPointerCode(methodBindingSet, javaUnit, jniUnit, structCTypeName, + containingCType, containingJType, i, func, fqStructFieldName1); } else if ( fieldType.isCompound() && !isOpaqueField ) { // FIXME: will need to support this at least in order to // handle the union in jawt_Win32DrawingSurfaceInfo (fabricate a name?) |