Author: Justin Peel <[email protected]>
Branch: unsigned-dtypes
Changeset: r46972:178ebefab2a6
Date: 2011-08-31 22:42 -0600
http://bitbucket.org/pypy/pypy/changeset/178ebefab2a6/

Log:    Add UInt16 dtype

diff --git a/pypy/module/micronumpy/interp_dtype.py 
b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -314,6 +314,17 @@
 class W_Int16Dtype(IntegerArithmeticDtype, W_Int16Dtype):
     pass
 
+W_UInt16Dtype = create_low_level_dtype(
+    num = 3, kind = SIGNEDLTR, name = "uint16",
+    aliases = ["uint16"],
+    applevel_types = [],
+    T = rffi.USHORT,
+    valtype = rffi.USHORT._type,
+    expected_size = 2,
+)
+class W_UInt16Dtype(IntegerArithmeticDtype, W_UInt16Dtype):
+    pass
+
 W_Int32Dtype = create_low_level_dtype(
     num = 5, kind = SIGNEDLTR, name = "int32",
     aliases = ["i"],
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to