summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/JavaEmitter.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-05-26 18:35:33 +0000
committerKenneth Russel <[email protected]>2008-05-26 18:35:33 +0000
commit040e730115f8a50b598edb448fc29f8917bde392 (patch)
tree9b2a78e5dc09d1c693a523355ad74242750e9eef /src/java/com/sun/gluegen/JavaEmitter.java
parentc84a0811ac16ef8c25f257c1bcee4d386e7afcb9 (diff)
Added support for passing outgoing arrays of compound types, including
non-const arrays of compound types and the associated copies back to Java, in support of constructs like eglChooseConfig. Generated code has been compiled but not yet tested. Refactorings to allow generated glue code using StructAccessors to work on Java ME / CDC / FP + JSR-239 NIO, as well as Java SE. Bug fix to ForceProcAddressGen. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@77 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/JavaEmitter.java')
-rw-r--r--src/java/com/sun/gluegen/JavaEmitter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java
index 48964b0..6b51ef0 100644
--- a/src/java/com/sun/gluegen/JavaEmitter.java
+++ b/src/java/com/sun/gluegen/JavaEmitter.java
@@ -1147,7 +1147,7 @@ public class JavaEmitter implements GlueEmitter {
} else if (targetType.isPointer() && (targetType.pointerDepth() == 1) &&
targetType.asPointer().getTargetType().isCompound()) {
// Array of pointers; convert as array of StructAccessors
- return JavaType.createForCArray(targetType);
+ return JavaType.createForCArray(bottomType);
} else {
throw new RuntimeException(
"Could not convert C type \"" + t + "\" " +
@@ -1456,6 +1456,7 @@ public class JavaEmitter implements GlueEmitter {
protected void emitCHeader(PrintWriter cWriter, String className) {
cWriter.println("#include <jni.h>");
+ cWriter.println("#include <stdlib.h>");
cWriter.println();
if (getConfig().emitImpl()) {
@@ -1557,7 +1558,6 @@ public class JavaEmitter implements GlueEmitter {
return binding;
}
-
private MethodBinding lowerMethodBindingPointerTypes(MethodBinding inputBinding,
boolean convertToArrays,
boolean[] canProduceArrayVariant) {