diff options
author | Sven Gothel <[email protected]> | 2023-08-04 11:00:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-08-04 11:00:11 +0200 |
commit | 97b574914f7f961458f6668495c2fef70b910549 (patch) | |
tree | ad4add84e22aa758fa10e2eaa47073a3dc1aff4f | |
parent | 3e249796e7b42033072aeda438d987601939db44 (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)
-rw-r--r-- | src/java/com/jogamp/gluegen/CMethodBindingEmitter.java | 6 |
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); } } |