aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-03 21:23:28 +0200
committerSven Gothel <[email protected]>2023-08-03 21:23:28 +0200
commit711533cef82cab317662e84f1d1719bdbeca4253 (patch)
tree11d9da1952c4a2d8e3cadca077b0ab7a1b946a79 /src/java/com/jogamp
parent910ce385d5e56eeb1fd7f81678042f19f76b1870 (diff)
JavaCallbackEmitter.{emitCSetFuncPreCall, emitCAdditionalCode, emitJavaCallbackBodyPassJavaArguments}(): Use capitalized sub-string 'baseArgName' for (static) callback related entities
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/gluegen/JavaCallbackEmitter.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
index a0874cb..0791768 100644
--- a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
+++ b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java
@@ -702,7 +702,7 @@ public final class JavaCallbackEmitter {
unit.emitln(" }");
final JavaType bbjt = JavaType.createForClass(ByteBuffer.class);
for (int i = 0; i < jcbCMethodEmitter.binding.getNumArguments(); i++) {
- final String baseArgName = jcbCMethodEmitter.binding.getArgumentName(i);
+ final String baseArgName = CodeGenUtils.capitalizeString( jcbCMethodEmitter.binding.getArgumentName(i) );
final JavaType currentJavaType = jcbCMethodEmitter.binding.getJavaArgumentType(i);
if( i != info.setFuncUserParamIdx && i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) {
final String staticBindingClazzArgVarName = "staticCBArg" + baseArgName + "Clazz"+jcbNativeBasename;
@@ -759,7 +759,7 @@ public final class JavaCallbackEmitter {
unit.emitln("static jclass "+staticBindingClazzVarName+" = NULL;");
unit.emitln("static jmethodID "+staticBindingMethodIDVarName+" = NULL;");
for (int i = 0; i < jcbCMethodEmitter.binding.getNumArguments(); i++) {
- final String baseArgName = jcbCMethodEmitter.binding.getArgumentName(i);
+ final String baseArgName = CodeGenUtils.capitalizeString( jcbCMethodEmitter.binding.getArgumentName(i) );
final JavaType currentJavaType = jcbCMethodEmitter.binding.getJavaArgumentType(i);
if( i != info.setFuncUserParamIdx && i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) {
final String staticBindingClazzArgVarName = "staticCBArg" + baseArgName + "Clazz"+jcbNativeBasename;
@@ -781,7 +781,7 @@ public final class JavaCallbackEmitter {
unit.emitln(" jclass cbClazz = "+staticBindingClazzVarName+";");
unit.emitln(" jmethodID cbMethod = "+staticBindingMethodIDVarName+";");
for (int i = 0; i < jcbCMethodEmitter.binding.getNumArguments(); i++) {
- final String baseArgName = jcbCMethodEmitter.binding.getArgumentName(i);
+ final String baseArgName = CodeGenUtils.capitalizeString( jcbCMethodEmitter.binding.getArgumentName(i) );
final JavaType currentJavaType = jcbCMethodEmitter.binding.getJavaArgumentType(i);
if( i != info.setFuncUserParamIdx && i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) {
final String staticBindingClazzArgVarName = "staticCBArg" + baseArgName + "Clazz"+jcbNativeBasename;
@@ -868,7 +868,8 @@ public final class JavaCallbackEmitter {
final String baseArgName = binding.getArgumentName(i);
final JavaType currentJavaType = binding.getJavaArgumentType(i);
if( i != info.setFuncUserParamIdx && i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) {
- unit.emit( "(*env)->CallStaticObjectMethod(env, cbClazzArg" + baseArgName + ", cbMethodArg" + baseArgName + ", " + baseArgName + "_jni)" );
+ final String cBaseArgName = CodeGenUtils.capitalizeString( baseArgName );
+ unit.emit( "(*env)->CallStaticObjectMethod(env, cbClazzArg" + cBaseArgName + ", cbMethodArg" + cBaseArgName + ", " + baseArgName + "_jni)" );
} else {
unit.emit( baseArgName + "_jni" );
}