aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-07-06 10:35:30 +0200
committerSven Gothel <[email protected]>2023-07-06 10:35:30 +0200
commit3ed3e9887c459169b807165c9df2ae2bc2990a31 (patch)
tree895211a59571e09e4128223dca2cda1bcf9a9d5c /src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
parent5b867d0f90a43a02e1fbd03fb1ed588a391806eb (diff)
GlueGen JavaCallback: Remove ambiguity: Config JavaCallbackDef/JavaCallbackKey: Always define both parameter indices; emitJavaStaticCallback(): Use cbFuncBinding and cbFuncKeyIndices from callback parameter to build key
Diffstat (limited to 'src/java/com/jogamp/gluegen/JavaCallbackEmitter.java')
-rw-r--r--src/java/com/jogamp/gluegen/JavaCallbackEmitter.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
index 1b6aa05..e4046ac 100644
--- a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
@@ -453,14 +453,10 @@ public final class JavaCallbackEmitter {
if( mapNativePtrToCompound[0] ) {
unit.emitln(" final "+origUserParamJType[0]+" "+info.cbFuncUserParamName+" = "+origUserParamJType[0]+".derefPointer(nativeUserParamPtr);");
}
- if( useDataMap ) {
- unit.emitln(" final "+DataClassName+" value;");
- } else {
- unit.emitln(" final "+DataClassName+" value;");
- }
+ unit.emitln(" final "+DataClassName+" value;");
unit.emitln(" synchronized( "+lockInstanceName+" ) {");
if( useDataMap ) {
- unit.emitln(" final "+KeyClassName+" key = new "+KeyClassName+"("+binding.getJavaCallSelectArguments(new StringBuilder(), info.setFuncKeyIndices, false).toString()+");");
+ unit.emitln(" final "+KeyClassName+" key = new "+KeyClassName+"("+info.cbFuncBinding.getJavaCallSelectArguments(new StringBuilder(), info.cbFuncKeyIndices, false).toString()+");");
unit.emitln(" value = "+dataMapInstanceName+".get(key);");
} else {
unit.emitln(" value = "+dataInstanceName+";");