summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/jogamp')
-rw-r--r--src/java/com/jogamp/gluegen/CMethodBindingEmitter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
index fb617ef..16adbe9 100644
--- a/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/jogamp/gluegen/CMethodBindingEmitter.java
@@ -457,8 +457,9 @@ public class CMethodBindingEmitter extends FunctionEmitter {
final JavaType javaReturnType = binding.getJavaReturnType();
if (!cReturnType.isVoid()) {
writer.print(" ");
- // Note we must respect const/volatile for return argument
- writer.print(binding.getCSymbol().getReturnType().getCName(true));
+ // Note we respect const/volatile in the function return type.
+ // However, we cannot have it 'const' for our local variable.
+ writer.print(binding.getCSymbol().getReturnType().getCName(false));
writer.println(" _res;");
if (javaReturnType.isNIOByteBufferArray() ||
javaReturnType.isArrayOfCompoundTypeWrappers()) {