aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-03 23:57:54 +0200
committerSven Gothel <[email protected]>2023-08-03 23:57:54 +0200
commite9a2294b3f18bb4c4f38347ccf347058cb4642b3 (patch)
tree3b587cea98326ea475184ccd580ca6c7fe4bdfea
parenta51c63b8b054eec3393d4c340cf3cefe561a01b1 (diff)
JavaCallbackEmitter.emitCSetFuncPreCall(): Drop redundant arg 'CMethodBindingEmitter jcbFuncCMethodEmitter', use local 'info.cbFuncBinding'
Was added in commit ad69716fda64b517c33ed847c4b215ea398aac99 'callback without userData', while adding ad-hoc compound conversion.
-rw-r--r--src/java/com/jogamp/gluegen/CMethodBindingEmitter.java2
-rw-r--r--src/java/com/jogamp/gluegen/JavaCallbackEmitter.java8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
index 3f4b55a..edc300a 100644
--- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
@@ -427,7 +427,7 @@ public class CMethodBindingEmitter extends FunctionEmitter {
emitBodyUserVariableDeclarations();
emitBodyVariablePreCallSetup();
if( null != javaCallbackEmitter ) {
- javaCallbackEmitter.emitCSetFuncPreCall(unit, jcbFuncCMethodEmitter);
+ javaCallbackEmitter.emitCSetFuncPreCall(unit);
}
emitBodyCallCFunction();
emitBodyUserVariableAssignments();
diff --git a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
index e7285f0..cb0de42 100644
--- a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
@@ -661,7 +661,7 @@ public final class JavaCallbackEmitter {
}
}
- public void emitCSetFuncPreCall(final CodeUnit unit, final CMethodBindingEmitter jcbFuncCMethodEmitter) {
+ public void emitCSetFuncPreCall(final CodeUnit unit) {
final String jcbNativeBasename = CodeGenUtils.capitalizeString( info.setFuncName );
final String jcbFriendlyBasename = info.setFuncName+"("+info.cbSimpleClazzName+")";
final String staticBindingMethodName = "invoke"+jcbNativeBasename;
@@ -701,9 +701,9 @@ public final class JavaCallbackEmitter {
unit.emitln(" "+staticBindingMethodIDVarName+" = cbMethodID;");
unit.emitln(" }");
final JavaType bbjt = JavaType.createForClass(ByteBuffer.class);
- for (int i = 0; i < jcbFuncCMethodEmitter.binding.getNumArguments(); i++) {
- final String baseArgName = CodeGenUtils.capitalizeString( jcbFuncCMethodEmitter.binding.getArgumentName(i) );
- final JavaType currentJavaType = jcbFuncCMethodEmitter.binding.getJavaArgumentType(i);
+ for (int i = 0; i < info.cbFuncBinding.getNumArguments(); i++) {
+ final String baseArgName = CodeGenUtils.capitalizeString( info.cbFuncBinding.getArgumentName(i) );
+ final JavaType currentJavaType = info.cbFuncBinding.getJavaArgumentType(i);
if( i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) {
final String staticBindingClazzArgVarName = "staticCBArg" + baseArgName + "Clazz"+jcbNativeBasename;
final String staticBindingMethodIDArgVarName = "staticCBArg" + baseArgName + "Method"+jcbNativeBasename;