diff options
author | Sven Gothel <[email protected]> | 2023-07-01 18:57:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-01 18:57:37 +0200 |
commit | 8766fcfdce4dd864fe6764b063a0f9a4b17327c1 (patch) | |
tree | 4fb5a2441b0a3fb9f3d12c6456f316b42b579cac /src/java/com/jogamp/gluegen/JavaEmitter.java | |
parent | 6200b9122a90ef8c2af8b9205b4b1c90b1aa5074 (diff) |
GlueGen JavaCallback: Only produce default 'Key' class if keys are used, expose 'Key' to public and use it. Expose release*() and get*Keys() methods
Further we use a dedicated lock Object used in the Java implementation.
TODO: Native static callback dispatch code shall
- (also) acquire the lock
- handle case where the data has been released already
to render this solution thread-safe and data-race free
Diffstat (limited to 'src/java/com/jogamp/gluegen/JavaEmitter.java')
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 7674e1f..c00d2ed 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -74,6 +74,7 @@ import com.jogamp.common.nio.Buffers; import com.jogamp.common.os.DynamicLookupHelper; import com.jogamp.common.os.MachineDataInfo; import com.jogamp.common.util.ArrayHashMap; +import com.jogamp.common.util.HashUtil; import com.jogamp.gluegen.ASTLocusTag.ASTLocusTagProvider; import com.jogamp.gluegen.JavaConfiguration.JavaCallbackDef; import com.jogamp.gluegen.JavaConfiguration.JavaCallbackInfo; @@ -2930,6 +2931,10 @@ public class JavaEmitter implements GlueEmitter { imports.add(DynamicLookupHelper.class.getPackage().getName()+".*"); imports.add(Buffers.class.getPackage().getName()+".*"); imports.add(Buffer.class.getPackage().getName()+".*"); + imports.add(HashUtil.class.getPackage().getName()+".*"); + imports.add("java.util.Set"); + imports.add("java.util.Map"); + imports.add("java.util.HashMap"); imports.add("java.nio.charset.Charset"); imports.add("java.nio.charset.StandardCharsets"); |