From c9c1ab75ea5c5ef7feae32f20bed840c2e8feaf4 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Mon, 31 May 2010 18:39:58 +0200 Subject: fixed handling of size_t which was broken since the introduction of Int64Buffer. --- src/java/com/sun/gluegen/JavaEmitter.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/java') 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(); -- cgit v1.2.3