From 3ed3e9887c459169b807165c9df2ae2bc2990a31 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 6 Jul 2023 10:35:30 +0200 Subject: GlueGen JavaCallback: Remove ambiguity: Config JavaCallbackDef/JavaCallbackKey: Always define both parameter indices; emitJavaStaticCallback(): Use cbFuncBinding and cbFuncKeyIndices from callback parameter to build key --- src/java/com/jogamp/gluegen/JavaCallbackEmitter.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/java/com/jogamp/gluegen/JavaCallbackEmitter.java') 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+";"); -- cgit v1.2.3