[pypy-svn] r50637 - pypy/branch/applevel-ctypes2/pypy/lib/_ctypes

arigo at codespeak.net arigo at codespeak.net
Tue Jan 15 16:52:32 CET 2008


Author: arigo
Date: Tue Jan 15 16:52:31 2008
New Revision: 50637

Modified:
   pypy/branch/applevel-ctypes2/pypy/lib/_ctypes/array.py
Log:
(fijal, arigo)  _sizeofinstances() on arrays.


Modified: pypy/branch/applevel-ctypes2/pypy/lib/_ctypes/array.py
==============================================================================
--- pypy/branch/applevel-ctypes2/pypy/lib/_ctypes/array.py	(original)
+++ pypy/branch/applevel-ctypes2/pypy/lib/_ctypes/array.py	Tue Jan 15 16:52:31 2008
@@ -37,6 +37,10 @@
 
     from_address = cdata_from_address
 
+    def _sizeofinstances(self):
+        size, alignment = self._ffiarray.gettypecode(self._length_)
+        return size
+
 class Array(_CData):
     __metaclass__ = ArrayMeta
 



More information about the Pypy-commit mailing list