[pypy-commit] pypy numpy-dtype-alt: This seems a little cleaner, still doesn't work though.

alex_gaynor noreply at buildbot.pypy.org
Sun Aug 7 02:56:36 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: numpy-dtype-alt
Changeset: r46342:39be8884254b
Date: 2011-08-06 17:58 -0700
http://bitbucket.org/pypy/pypy/changeset/39be8884254b/

Log:	This seems a little cleaner, still doesn't work though.

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
@@ -38,7 +38,7 @@
     _mixin_ = True
 
     def erase(self, storage):
-        return rffi.cast(rffi.VOIDP, storage)
+        return rffi.cast(VOID_TP, storage)
     def unerase(self, storage):
         return rffi.cast(self.TP, storage)
 
@@ -58,6 +58,7 @@
     def setitem_w(self, space, storage, i, w_item):
         self.setitem(storage, i, self.unwrap(space, w_item))
 
+VOID_TP = lltype.Array(lltype.Void, hints={'nolength': True})
 
 class W_Int8Dtype(W_Dtype, LowLevelDtype):
     num = 1


More information about the pypy-commit mailing list