diff options
author | Michael Bien <[email protected]> | 2010-05-31 18:39:58 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-05-31 18:39:58 +0200 |
commit | c9c1ab75ea5c5ef7feae32f20bed840c2e8feaf4 (patch) | |
tree | 78a60432fefb179f5df11bf3c41db7de6246404e /src | |
parent | 6ea8793685fd07747d0cc13495adb02a0ec494d8 (diff) |
fixed handling of size_t which was broken since the introduction of Int64Buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/sun/gluegen/JavaEmitter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java index f25c738..2a51a64 100644 --- a/src/java/com/sun/gluegen/JavaEmitter.java +++ b/src/java/com/sun/gluegen/JavaEmitter.java @@ -1279,6 +1279,10 @@ public class JavaEmitter implements GlueEmitter { if (targetType.isVoid()) { return JavaType.createForVoidPointer(); } else if (targetType.isInt()) { + // size_t is always a PointerBuffer since size is arch dependent + if ("size_t".equals(targetType.getName())) { + return JavaType.forNIOPointerBufferClass(); + } switch ((int) targetType.getSize(curMachDesc)) { case 1: return JavaType.createForCCharPointer(); case 2: return JavaType.createForCShortPointer(); |