java-gobject-introspection r83 - trunk/src/org/gnome/gir/compiler



Author: walters
Date: Sat Oct 18 01:09:37 2008
New Revision: 83
URL: http://svn.gnome.org/viewvc/java-gobject-introspection?rev=83&view=rev

Log:
Handle TypeTag.LONG by looking at Native.LONG_SIZE


Modified:
   trunk/src/org/gnome/gir/compiler/CodeFactory.java

Modified: trunk/src/org/gnome/gir/compiler/CodeFactory.java
==============================================================================
--- trunk/src/org/gnome/gir/compiler/CodeFactory.java	(original)
+++ trunk/src/org/gnome/gir/compiler/CodeFactory.java	Sat Oct 18 01:09:37 2008
@@ -111,6 +111,7 @@
 import org.objectweb.asm.util.CheckClassAdapter;
 
 import com.sun.jna.Function;
+import com.sun.jna.Native;
 import com.sun.jna.Pointer;
 import com.sun.jna.ptr.ByteByReference;
 import com.sun.jna.ptr.DoubleByReference;
@@ -270,6 +271,12 @@
 		if (tag == TypeTag.INT64 || tag == TypeTag.UINT64
 				|| tag == TypeTag.SIZE || tag == TypeTag.SSIZE)
 			return Type.LONG_TYPE;
+		if (tag == TypeTag.LONG) {
+			if (Native.LONG_SIZE == 8)
+				return Type.LONG_TYPE;
+			else
+				return Type.INT_TYPE;
+		}
 		if (tag == TypeTag.FLOAT)
 			return Type.FLOAT_TYPE;
 		if (tag == TypeTag.DOUBLE)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]