[pypy-svn] r13471 - pypy/dist/pypy/rpython

ale at codespeak.net ale at codespeak.net
Thu Jun 16 13:22:22 CEST 2005


Author: ale
Date: Thu Jun 16 13:22:21 2005
New Revision: 13471

Modified:
   pypy/dist/pypy/rpython/interp.py
Log:
added getarraysize

Modified: pypy/dist/pypy/rpython/interp.py
==============================================================================
--- pypy/dist/pypy/rpython/interp.py	(original)
+++ pypy/dist/pypy/rpython/interp.py	Thu Jun 16 13:22:21 2005
@@ -164,10 +164,15 @@
 
     def op_getarraysubstruct(self, array, index):
         assert isinstance(array, _ptr)
+        
         return array[index]
         # the diff between op_getarrayitem and op_getarraysubstruct
         # is the same as between op_getfield and op_getsubstruct
 
+    def op_getarraysize(self,array):
+        #print array,type(array),dir(array)
+        return len(array)
+    
     def op_cast_pointer(self, tp, obj):
         # well, actually this is what's now in the globals.
         return cast_pointer(tp, obj)



More information about the Pypy-commit mailing list