diff options
author | Kenneth Russel <[email protected]> | 2006-01-01 23:13:49 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-01 23:13:49 +0000 |
commit | 93af6f22ccdf050cafe80ab4c2d29f9924064f1c (patch) | |
tree | cd85d6deedb7bd25fc08f302ff9a85e4c8bab0d9 /src/classes/com | |
parent | 875a3de8f54704604d006badf0f0747347319025 (diff) |
Fixed build problems on X11 platforms after last checkin
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@507 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com')
-rw-r--r-- | src/classes/com/sun/gluegen/CMethodBindingEmitter.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/classes/com/sun/gluegen/CMethodBindingEmitter.java b/src/classes/com/sun/gluegen/CMethodBindingEmitter.java index 550d8d739..4208dfff1 100644 --- a/src/classes/com/sun/gluegen/CMethodBindingEmitter.java +++ b/src/classes/com/sun/gluegen/CMethodBindingEmitter.java @@ -1033,14 +1033,15 @@ public class CMethodBindingEmitter extends FunctionEmitter writer.println(" " + arrayRes + " = (*env)->NewObjectArray(env, " + arrayResLength + ", (*env)->FindClass(env, \"java/nio/ByteBuffer\"), NULL);"); writer.println(" for (" + arrayIdx + " = 0; " + arrayIdx + " < " + arrayResLength + "; " + arrayIdx + "++) {"); Type retType = binding.getCSymbol().getReturnType(); - Type baseType; + Type pointerType; if (retType.isPointer()) { - baseType = retType.asPointer().getTargetType().asPointer().getTargetType(); + pointerType = retType.asPointer().getTargetType(); } else { - baseType = retType.asArray().getElementType().asPointer().getTargetType(); + pointerType = retType.asArray().getElementType(); } + Type baseType = pointerType.asPointer().getTargetType(); writer.println(" (*env)->SetObjectArrayElement(env, " + arrayRes + ", " + arrayIdx + - ", (*env)->NewDirectByteBuffer(env, _res[" + arrayIdx + "], sizeof(" + baseType.getName() + ")));"); + ", (*env)->NewDirectByteBuffer(env, _res[" + arrayIdx + "], sizeof(" + pointerType.getName() + ")));"); writer.println(" }"); writer.println(" return " + arrayRes + ";"); } else if (javaReturnType.isArray()) { |