summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/sun/gluegen/JavaEmitter.java4
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();