[pypy-commit] pypy unsigned-dtypes: Add UInt16 dtype

justinpeel noreply at buildbot.pypy.org
Thu Sep 1 06:52:42 CEST 2011


Author: Justin Peel <notmuchtotell at gmail.com>
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"],


More information about the pypy-commit mailing list