aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-04 11:00:11 +0200
committerSven Gothel <[email protected]>2023-08-04 11:00:11 +0200
commit97b574914f7f961458f6668495c2fef70b910549 (patch)
treead4add84e22aa758fa10e2eaa47073a3dc1aff4f /src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
parent3e249796e7b42033072aeda438d987601939db44 (diff)
CMethodBindingEmitter.emitBodyPassCArguments(): Either pass STRING_CHARS_PREFIX or javaCallbackEmitter.emitCOptArgumentSuffix(..)
We only produce one variant in code. Use case: String type as userParam (barely tested and not useful)
Diffstat (limited to 'src/java/com/jogamp/gluegen/CMethodBindingEmitter.java')
-rw-r--r--src/java/com/jogamp/gluegen/CMethodBindingEmitter.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
index edc300a..cbd33fd 100644
--- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
@@ -984,9 +984,11 @@ public class CMethodBindingEmitter extends FunctionEmitter {
unit.emit(") + " + byteOffsetArgName(i) + ")");
}
} else {
- if (javaArgType.isString()) { unit.emit(STRING_CHARS_PREFIX); }
+ if ( javaArgType.isString() ) {
+ unit.emit(STRING_CHARS_PREFIX);
+ }
unit.emit(binding.getArgumentName(i));
- if( null != javaCallbackEmitter ) {
+ if( !javaArgType.isString() && null != javaCallbackEmitter ) {
javaCallbackEmitter.emitCOptArgumentSuffix(unit, i);
}
}