diff options
author | Sven Gothel <[email protected]> | 2023-08-04 00:07:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-08-04 00:07:36 +0200 |
commit | e729d53c8384757b6a5ada2491c7cd4ad07c8bfe (patch) | |
tree | 86a12ba3916736fa7ad9381257a3e4bfa2d35857 /src/java | |
parent | e9a2294b3f18bb4c4f38347ccf347058cb4642b3 (diff) |
JavaCallbackEmitter.emitJavaCallbackBodyPassJavaArguments(): Drop redundant arg 'MethodBinding jcbFuncCMethodBinding', use local 'info.cbFuncBinding'
Since emitJavaCallbackBodyPassJavaArguments() is private now,
only use case is to handle info.cbFuncBinding and we can drop the redundant argument.
Similar to cleanup commit e9a2294b3f18bb4c4f38347ccf347058cb4642b3
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaCallbackEmitter.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java index cb0de42..e9b5c93 100644 --- a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java @@ -823,7 +823,7 @@ public final class JavaCallbackEmitter { } unit.emit("(*env)->CallStatic" + CodeGenUtils.capitalizeString( jretType.getName() ) +"Method(env, cbClazz, cbMethod, "); // javaCallback.cbFuncCEmitter.emitBodyPassCArguments(); - emitJavaCallbackBodyPassJavaArguments(unit, jcbFuncCMethodEmitter.binding); + emitJavaCallbackBodyPassJavaArguments(unit); unit.emitln(");"); unit.emitln(" if( (*env)->ExceptionCheck(env) ) {"); unit.emitln(" fprintf(stderr, \"Info: Callback '"+jcbFriendlyBasename+"': Exception in Java Callback caught:\\n\");"); @@ -854,16 +854,16 @@ public final class JavaCallbackEmitter { return count; } - private int emitJavaCallbackBodyPassJavaArguments(final CodeUnit unit, final MethodBinding jcbFuncCMethodBinding) { + private int emitJavaCallbackBodyPassJavaArguments(final CodeUnit unit) { int count = 0; boolean needsComma = false; - for (int i = 0; i < jcbFuncCMethodBinding.getNumArguments(); i++) { + for (int i = 0; i < info.cbFuncBinding.getNumArguments(); i++) { if (needsComma) { unit.emit(", "); needsComma = false; } - final String baseArgName = jcbFuncCMethodBinding.getArgumentName(i); - final JavaType currentJavaType = jcbFuncCMethodBinding.getJavaArgumentType(i); + final String baseArgName = info.cbFuncBinding.getArgumentName(i); + final JavaType currentJavaType = info.cbFuncBinding.getJavaArgumentType(i); if( i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) { final String cBaseArgName = CodeGenUtils.capitalizeString( baseArgName ); unit.emit( "(*env)->CallStaticObjectMethod(env, cbClazzArg" + cBaseArgName + ", cbMethodArg" + cBaseArgName + ", " + baseArgName + "_jni)" ); |