From: <wme...@us...> - 2009-08-26 07:18:44
|
Revision: 6721 http://jython.svn.sourceforge.net/jython/?rev=6721&view=rev Author: wmeissner Date: 2009-08-26 07:18:30 +0000 (Wed, 26 Aug 2009) Log Message: ----------- Rename Type to CType in java code Modified Paths: -------------- branches/ctypes-jffi/src/org/python/modules/jffi/CData.java branches/ctypes-jffi/src/org/python/modules/jffi/DefaultInvokerFactory.java branches/ctypes-jffi/src/org/python/modules/jffi/FastIntInvokerFactory.java branches/ctypes-jffi/src/org/python/modules/jffi/Function.java branches/ctypes-jffi/src/org/python/modules/jffi/ScalarCData.java branches/ctypes-jffi/src/org/python/modules/jffi/jffi.java Added Paths: ----------- branches/ctypes-jffi/src/org/python/modules/jffi/CType.java Removed Paths: ------------- branches/ctypes-jffi/src/org/python/modules/jffi/Type.java Modified: branches/ctypes-jffi/src/org/python/modules/jffi/CData.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/CData.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/CData.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -14,12 +14,12 @@ public static final PyType TYPE = PyType.fromClass(CData.class); final MemoryOp memoryOp; - final Type type; + final CType type; private Memory contentMemory; private PyObject value; - CData(PyType subtype, Type type, MemoryOp memoryOp) { + CData(PyType subtype, CType type, MemoryOp memoryOp) { super(subtype); this.type = type; this.memoryOp = memoryOp; Copied: branches/ctypes-jffi/src/org/python/modules/jffi/CType.java (from rev 6720, branches/ctypes-jffi/src/org/python/modules/jffi/Type.java) =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/CType.java (rev 0) +++ branches/ctypes-jffi/src/org/python/modules/jffi/CType.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -0,0 +1,229 @@ + +package org.python.modules.jffi; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import org.python.core.Py; +import org.python.core.PyNewWrapper; +import org.python.core.PyObject; +import org.python.core.PyObjectDerived; +import org.python.core.PyType; +import org.python.expose.ExposeAsSuperclass; +import org.python.expose.ExposedGet; +import org.python.expose.ExposedNew; +import org.python.expose.ExposedType; + +@ExposedType(name = "jffi.Type", base = PyObjectDerived.class) +public class CType extends PyObject { + public static final PyType TYPE = PyType.fromClass(CType.class); + static { + TYPE.fastGetDict().__setitem__("Array", Array.TYPE); + TYPE.fastGetDict().__setitem__("Pointer", Pointer.TYPE); + } + public static final CType VOID = primitive(NativeType.VOID); + public static final CType BYTE = primitive(NativeType.BYTE); + public static final CType UBYTE = primitive(NativeType.UBYTE); + public static final CType SHORT = primitive(NativeType.SHORT); + public static final CType USHORT = primitive(NativeType.USHORT); + public static final CType INT = primitive(NativeType.INT); + public static final CType UINT = primitive(NativeType.UINT); + public static final CType LONGLONG = primitive(NativeType.LONGLONG); + public static final CType ULONGLONG = primitive(NativeType.ULONGLONG); + public static final CType LONG = primitive(NativeType.LONG); + public static final CType ULONG = primitive(NativeType.ULONG); + public static final CType FLOAT = primitive(NativeType.FLOAT); + public static final CType DOUBLE = primitive(NativeType.DOUBLE); + public static final CType POINTER = primitive(NativeType.POINTER); + public static final CType STRING = primitive(NativeType.STRING); + + final com.kenai.jffi.Type jffiType; + + final NativeType nativeType; + + /** Size of this type in bytes */ + @ExposedGet + public final int size; + + /** Minimum alignment of this type in bytes */ + @ExposedGet + public final int alignment; + + /** The <tt>MemoryOp</tt> used to read/write items of this type */ + private final MemoryOp memoryOp; + + CType(NativeType type, com.kenai.jffi.Type jffiType, MemoryOp memoryOp) { + this.nativeType = type; + this.jffiType = jffiType; + this.size = jffiType.size(); + this.alignment = jffiType.alignment(); + this.memoryOp = memoryOp; + } + + public NativeType getNativeType() { + return nativeType; + } + + MemoryOp getMemoryOp() { + return memoryOp; + } + + public int alignment() { + return alignment; + } + + public int size() { + return size; + } + + static final CType primitive(NativeType type) { + CType t = new Builtin(type, NativeType.jffiType(type)); + CType.TYPE.fastGetDict().__setitem__(type.name(), t); + return t; + } + + static final class Builtin extends CType implements ExposeAsSuperclass { + public Builtin(NativeType type, com.kenai.jffi.Type jffiType) { + super(type, jffiType, MemoryOp.getMemoryOp(type)); + } + + @Override + public final String toString() { + return "<jffi.Type." + nativeType.name() + ">"; + } + } + + @ExposedType(name = "jffi.Type.Array", base = CType.class) + static final class Array extends CType { + public static final PyType TYPE = PyType.fromClass(Array.class); + final CType componentType; + + @ExposedGet + public final int length; + + public Array(CType componentType, int length) { + super(NativeType.ARRAY, new com.kenai.jffi.Array(componentType.jffiType, length), null); + this.componentType = componentType; + this.length = length; + } + + @ExposedNew + public static PyObject Array_new(PyNewWrapper new_, boolean init, PyType subtype, + PyObject[] args, String[] keywords) { + + if (args.length != 2) { + throw Py.TypeError(String.format("__init__() takes exactly 2 arguments (%d given)", args.length)); + } + + if (!(args[0] instanceof CType)) { + throw Py.TypeError("expected jffi.Type"); + } + + return new Array((CType) args[0], args[1].asInt()); + } + + @Override + public int __len__() { + return length; + } + + @Override + public final String toString() { + return String.format("<jffi.Type.Array length=%d>", length); + } + } + + @ExposedType(name = "jffi.Type.Pointer", base = CType.class) + final static class Pointer extends CType { + public static final PyType TYPE = PyType.fromClass(Pointer.class); + private static final ConcurrentMap<PyObject, Pointer> typeCache + = new ConcurrentHashMap<PyObject, Pointer>(); + + final CType componentType; + final PyType pyComponentType; + final MemoryOp componentMemoryOp; + + Pointer(PyType subtype, CType componentType, PyType pyComponentType) { + super(NativeType.POINTER, com.kenai.jffi.Type.POINTER, MemoryOp.POINTER); + this.componentType = componentType; + this.pyComponentType = pyComponentType; + if (pyComponentType.isSubType(ScalarCData.TYPE)) { + this.componentMemoryOp = new ScalarOp(MemoryOp.getMemoryOp(componentType.getNativeType()), pyComponentType); + } else { + throw Py.TypeError("pointer only supported for scalar types"); + } + + } + + @ExposedNew + public static PyObject Pointer_new(PyNewWrapper new_, boolean init, PyType subtype, + PyObject[] args, String[] keywords) { + + Pointer p = typeCache.get(args[0]); + if (p != null) { + return p; + } + + if (args.length < 1) { + throw Py.TypeError(String.format("__init__() takes exactly 1 argument (%d given)", args.length)); + } + + if (!(args[0] instanceof CType)) { + throw Py.TypeError("expected jffi.Type"); + } + + if (args.length > 1 && !(args[1] instanceof PyType)) { + throw Py.TypeError("expected type"); + } + p = new Pointer(subtype, (CType) args[0], args.length > 1 ? (PyType) args[1] : Py.None.getType()); + typeCache.put(args[0], p); + + return p; + } + + @Override + public final String toString() { + return String.format("<jffi.Type.Pointer component_type=%s>", componentType.toString()); + } + + @Override + public PyObject __call__(PyObject value) { + if (value == Py.None) { + + return new org.python.modules.jffi.Pointer(new NullMemory(), componentMemoryOp); + + } else if (value.getType().isSubType(pyComponentType) && value instanceof CData) { + + return new org.python.modules.jffi.Pointer((DirectMemory) ((CData) value).getContentMemory(), componentMemoryOp); + + } else { + throw Py.TypeError("expected " + pyComponentType.getName() + " instead of " + value.getType().getName()); + } + } + + private static final class ScalarOp extends MemoryOp { + private final MemoryOp op; + private final PyType type; + + public ScalarOp(MemoryOp op, PyType type) { + this.op = op; + this.type = type; + } + + public final void put(Memory mem, long offset, PyObject value) { + op.put(mem, offset, value); + } + + public final PyObject get(Memory mem, long offset) { + PyObject result = type.__call__(op.get(mem, offset)); + // + // Point the CData to the backing memory so all value gets/sets + // update the same memory this pointer points to + // + if (result instanceof CData) { + ((CData) result).setContentMemory(mem); + } + return result; + } + } + } +} Modified: branches/ctypes-jffi/src/org/python/modules/jffi/DefaultInvokerFactory.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/DefaultInvokerFactory.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/DefaultInvokerFactory.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -19,7 +19,7 @@ private DefaultInvokerFactory() {} - final Invoker createInvoker(com.kenai.jffi.Function function, Type[] parameterTypes, Type returnType) { + final Invoker createInvoker(com.kenai.jffi.Function function, CType[] parameterTypes, CType returnType) { ParameterMarshaller[] marshallers = new ParameterMarshaller[parameterTypes.length]; for (int i = 0; i < marshallers.length; ++i) { @@ -27,7 +27,7 @@ } - if (returnType instanceof Type.Builtin) { + if (returnType instanceof CType.Builtin) { switch (returnType.getNativeType()) { case VOID: return new VoidInvoker(function, marshallers); @@ -128,8 +128,8 @@ } } - private static final ParameterMarshaller getMarshaller(Type type) { - if (type instanceof Type.Builtin) { + private static final ParameterMarshaller getMarshaller(CType type) { + if (type instanceof CType.Builtin) { return getMarshaller(type.getNativeType()); } else { throw Py.RuntimeError("Unsupported parameter type: " + type); Modified: branches/ctypes-jffi/src/org/python/modules/jffi/FastIntInvokerFactory.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/FastIntInvokerFactory.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/FastIntInvokerFactory.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -53,7 +53,7 @@ * @param parameterTypes The parameter types of the native function. * @return <tt>true</tt> if the method can be handled as a fast int method. */ - final boolean isFastIntMethod(Type returnType, Type[] parameterTypes) { + final boolean isFastIntMethod(CType returnType, CType[] parameterTypes) { for (int i = 0; i < parameterTypes.length; ++i) { if (!isFastIntParam(parameterTypes[i])) { return false; @@ -68,8 +68,8 @@ * @param type The result type. * @return <tt>true</tt> if <tt>type</tt> can be returned as an integer. */ - final boolean isFastIntResult(Type type) { - if (type instanceof Type.Builtin) { + final boolean isFastIntResult(CType type) { + if (type instanceof CType.Builtin) { switch (type.getNativeType()) { case VOID: case BYTE: @@ -99,8 +99,8 @@ * @param type The parameter type. * @return <tt>true</tt> if <tt>type</tt> can be passed as an integer. */ - final boolean isFastIntParam(Type paramType) { - if (paramType instanceof Type.Builtin) { + final boolean isFastIntParam(CType paramType) { + if (paramType instanceof CType.Builtin) { switch (paramType.getNativeType()) { case BYTE: case UBYTE: @@ -132,7 +132,7 @@ * @param returnType The result type the function will return * @return A new {@link Invoker} instance. */ - final Invoker createInvoker(Function function, Type[] parameterTypes, Type returnType) { + final Invoker createInvoker(Function function, CType[] parameterTypes, CType returnType) { IntParameterConverter[] parameterConverters = new IntParameterConverter[parameterTypes.length]; for (int i = 0; i < parameterConverters.length; ++i) { @@ -171,8 +171,8 @@ * @param type The python C type * @return An <tt>IntParameterConverter</tt> instance. */ - final IntParameterConverter getIntParameterConverter(Type type) { - if (type instanceof Type.Builtin) { + final IntParameterConverter getIntParameterConverter(CType type) { + if (type instanceof CType.Builtin) { return getIntParameterConverter(type.getNativeType()); } throw Py.TypeError("cannot convert objects of type " + type + " to int"); @@ -237,8 +237,8 @@ * @param type The object type. * @return An <tt>IntResultConverter</tt> instance. */ - final IntResultConverter getIntResultConverter(Type type) { - return type instanceof Type.Builtin ? getIntResultConverter(type.getNativeType()) : null; + final IntResultConverter getIntResultConverter(CType type) { + return type instanceof CType.Builtin ? getIntResultConverter(type.getNativeType()) : null; } Modified: branches/ctypes-jffi/src/org/python/modules/jffi/Function.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/Function.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/Function.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -21,8 +21,8 @@ private final PyStringMap dict = new PyStringMap(); - private volatile Type returnType = Type.SINT32; - private volatile Type[] parameterTypes = null; + private volatile CType returnType = CType.INT; + private volatile CType[] parameterTypes = null; private Invoker invoker = null; @ExposedGet @@ -110,17 +110,17 @@ @ExposedSet(name = "_jffi_restype") public void setReturnType(PyObject returnType) { - if (!(returnType instanceof Type)) { + if (!(returnType instanceof CType)) { throw Py.TypeError("wrong argument type (expected jffi.Type)"); } this.invoker = null; // invalidate old invoker - this.returnType = (Type) returnType; + this.returnType = (CType) returnType; } @ExposedGet(name = "_jffi_argtypes") public PyObject getParameterTypes() { - return new PyList(parameterTypes != null ? parameterTypes : new Type[0]); + return new PyList(parameterTypes != null ? parameterTypes : new CType[0]); } @ExposedSet(name = "_jffi_argtypes") @@ -135,13 +135,13 @@ throw Py.TypeError("wrong argument type (expected list of jffi.Type)"); } - Type[] paramTypes = new Type[((PyList) parameterTypes).size()]; + CType[] paramTypes = new CType[((PyList) parameterTypes).size()]; for (int i = 0; i < paramTypes.length; ++i) { PyObject t = ((PyList) parameterTypes).pyget(i); - if (!(t instanceof Type)) { + if (!(t instanceof CType)) { throw Py.TypeError(String.format("wrong argument type for parameter %d (expected jffi.Type)", i)); } - paramTypes[i] = (Type) t; + paramTypes[i] = (CType) t; } this.invoker = null; // invalidate old invoker @@ -156,7 +156,7 @@ return createInvoker(address, returnType, parameterTypes); } - private synchronized final Invoker createInvoker(long address, Type returnType, Type[] parameterTypes) { + private synchronized final Invoker createInvoker(long address, CType returnType, CType[] parameterTypes) { if (parameterTypes == null) { throw Py.NotImplementedError("variadic functions not supported yet; specify a parameter list"); } Modified: branches/ctypes-jffi/src/org/python/modules/jffi/ScalarCData.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/ScalarCData.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/ScalarCData.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -21,11 +21,11 @@ PyObject jffi_type = subtype.__getattr__("_jffi_type"); - if (!(jffi_type instanceof Type.Builtin)) { + if (!(jffi_type instanceof CType.Builtin)) { throw Py.TypeError("invalid _jffi_type for " + subtype.getName()); } - ScalarCData cdata = new ScalarCData(subtype, (Type.Builtin) jffi_type); + ScalarCData cdata = new ScalarCData(subtype, (CType.Builtin) jffi_type); // If an initial value was supplied, use it, else default to zero cdata.setValue(args.length > 0 ? args[0] : Py.newInteger(0)); @@ -33,7 +33,7 @@ return cdata; } - ScalarCData(PyType pyType, Type.Builtin type) { + ScalarCData(PyType pyType, CType.Builtin type) { super(pyType, type, type.getMemoryOp()); } Deleted: branches/ctypes-jffi/src/org/python/modules/jffi/Type.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/Type.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/Type.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -1,229 +0,0 @@ - -package org.python.modules.jffi; - -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import org.python.core.Py; -import org.python.core.PyNewWrapper; -import org.python.core.PyObject; -import org.python.core.PyObjectDerived; -import org.python.core.PyType; -import org.python.expose.ExposeAsSuperclass; -import org.python.expose.ExposedGet; -import org.python.expose.ExposedNew; -import org.python.expose.ExposedType; - -@ExposedType(name = "jffi.Type", base = PyObjectDerived.class) -public class Type extends PyObject { - public static final PyType TYPE = PyType.fromClass(Type.class); - static { - TYPE.fastGetDict().__setitem__("Array", Array.TYPE); - TYPE.fastGetDict().__setitem__("Pointer", Pointer.TYPE); - } - public static final Type VOID = primitive(NativeType.VOID); - public static final Type SINT8 = primitive(NativeType.BYTE); - public static final Type UINT8 = primitive(NativeType.UBYTE); - public static final Type SINT16 = primitive(NativeType.SHORT); - public static final Type UINT16 = primitive(NativeType.USHORT); - public static final Type SINT32 = primitive(NativeType.INT); - public static final Type UINT32 = primitive(NativeType.UINT); - public static final Type SINT64 = primitive(NativeType.LONGLONG); - public static final Type UINT64 = primitive(NativeType.ULONGLONG); - public static final Type SLONG = primitive(NativeType.LONG); - public static final Type ULONG = primitive(NativeType.ULONG); - public static final Type FLOAT = primitive(NativeType.FLOAT); - public static final Type DOUBLE = primitive(NativeType.DOUBLE); - public static final Type POINTER = primitive(NativeType.POINTER); - public static final Type STRING = primitive(NativeType.STRING); - - final com.kenai.jffi.Type jffiType; - - final NativeType nativeType; - - /** Size of this type in bytes */ - @ExposedGet - public final int size; - - /** Minimum alignment of this type in bytes */ - @ExposedGet - public final int alignment; - - /** The <tt>MemoryOp</tt> used to read/write items of this type */ - private final MemoryOp memoryOp; - - Type(NativeType type, com.kenai.jffi.Type jffiType, MemoryOp memoryOp) { - this.nativeType = type; - this.jffiType = jffiType; - this.size = jffiType.size(); - this.alignment = jffiType.alignment(); - this.memoryOp = memoryOp; - } - - public NativeType getNativeType() { - return nativeType; - } - - MemoryOp getMemoryOp() { - return memoryOp; - } - - public int alignment() { - return alignment; - } - - public int size() { - return size; - } - - static final Type primitive(NativeType type) { - Type t = new Builtin(type, NativeType.jffiType(type)); - Type.TYPE.fastGetDict().__setitem__(type.name(), t); - return t; - } - - static final class Builtin extends Type implements ExposeAsSuperclass { - public Builtin(NativeType type, com.kenai.jffi.Type jffiType) { - super(type, jffiType, MemoryOp.getMemoryOp(type)); - } - - @Override - public final String toString() { - return "<jffi.Type." + nativeType.name() + ">"; - } - } - - @ExposedType(name = "jffi.Type.Array", base = Type.class) - static final class Array extends Type { - public static final PyType TYPE = PyType.fromClass(Array.class); - final Type componentType; - - @ExposedGet - public final int length; - - public Array(Type componentType, int length) { - super(NativeType.ARRAY, new com.kenai.jffi.Array(componentType.jffiType, length), null); - this.componentType = componentType; - this.length = length; - } - - @ExposedNew - public static PyObject Array_new(PyNewWrapper new_, boolean init, PyType subtype, - PyObject[] args, String[] keywords) { - - if (args.length != 2) { - throw Py.TypeError(String.format("__init__() takes exactly 2 arguments (%d given)", args.length)); - } - - if (!(args[0] instanceof Type)) { - throw Py.TypeError("expected jffi.Type"); - } - - return new Array((Type) args[0], args[1].asInt()); - } - - @Override - public int __len__() { - return length; - } - - @Override - public final String toString() { - return String.format("<jffi.Type.Array length=%d>", length); - } - } - - @ExposedType(name = "jffi.Type.Pointer", base = Type.class) - final static class Pointer extends Type { - public static final PyType TYPE = PyType.fromClass(Pointer.class); - private static final ConcurrentMap<PyObject, Pointer> typeCache - = new ConcurrentHashMap<PyObject, Pointer>(); - - final Type componentType; - final PyType pyComponentType; - final MemoryOp componentMemoryOp; - - Pointer(PyType subtype, Type componentType, PyType pyComponentType) { - super(NativeType.POINTER, com.kenai.jffi.Type.POINTER, MemoryOp.POINTER); - this.componentType = componentType; - this.pyComponentType = pyComponentType; - if (pyComponentType.isSubType(ScalarCData.TYPE)) { - this.componentMemoryOp = new ScalarOp(MemoryOp.getMemoryOp(componentType.getNativeType()), pyComponentType); - } else { - throw Py.TypeError("pointer only supported for scalar types"); - } - - } - - @ExposedNew - public static PyObject Pointer_new(PyNewWrapper new_, boolean init, PyType subtype, - PyObject[] args, String[] keywords) { - - Pointer p = typeCache.get(args[0]); - if (p != null) { - return p; - } - - if (args.length < 1) { - throw Py.TypeError(String.format("__init__() takes exactly 1 argument (%d given)", args.length)); - } - - if (!(args[0] instanceof Type)) { - throw Py.TypeError("expected jffi.Type"); - } - - if (args.length > 1 && !(args[1] instanceof PyType)) { - throw Py.TypeError("expected type"); - } - p = new Pointer(subtype, (Type) args[0], args.length > 1 ? (PyType) args[1] : Py.None.getType()); - typeCache.put(args[0], p); - - return p; - } - - @Override - public final String toString() { - return String.format("<jffi.Type.Pointer component_type=%s>", componentType.toString()); - } - - @Override - public PyObject __call__(PyObject value) { - if (value == Py.None) { - - return new org.python.modules.jffi.Pointer(new NullMemory(), componentMemoryOp); - - } else if (value.getType().isSubType(pyComponentType) && value instanceof CData) { - - return new org.python.modules.jffi.Pointer((DirectMemory) ((CData) value).getContentMemory(), componentMemoryOp); - - } else { - throw Py.TypeError("expected " + pyComponentType.getName() + " instead of " + value.getType().getName()); - } - } - - private static final class ScalarOp extends MemoryOp { - private final MemoryOp op; - private final PyType type; - - public ScalarOp(MemoryOp op, PyType type) { - this.op = op; - this.type = type; - } - - public final void put(Memory mem, long offset, PyObject value) { - op.put(mem, offset, value); - } - - public final PyObject get(Memory mem, long offset) { - PyObject result = type.__call__(op.get(mem, offset)); - // - // Point the CData to the backing memory so all value gets/sets - // update the same memory this pointer points to - // - if (result instanceof CData) { - ((CData) result).setContentMemory(mem); - } - return result; - } - } - } -} Modified: branches/ctypes-jffi/src/org/python/modules/jffi/jffi.java =================================================================== --- branches/ctypes-jffi/src/org/python/modules/jffi/jffi.java 2009-08-26 05:25:19 UTC (rev 6720) +++ branches/ctypes-jffi/src/org/python/modules/jffi/jffi.java 2009-08-26 07:18:30 UTC (rev 6721) @@ -18,7 +18,7 @@ public static void classDictInit(PyObject dict) { dict.__setitem__("__name__", Py.newString("jffi")); dict.__setitem__("DynamicLibrary", DynamicLibrary.TYPE); - dict.__setitem__("Type", Type.TYPE); + dict.__setitem__("Type", CType.TYPE); dict.__setitem__("Pointer", Pointer.TYPE); dict.__setitem__("Function", Function.TYPE); dict.__setitem__("ScalarCData", ScalarCData.TYPE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |