[pypy-svn] r79553 - pypy/trunk/pypy/rpython/lltypesystem

arigo at codespeak.net arigo at codespeak.net
Fri Nov 26 13:47:18 CET 2010


Author: arigo
Date: Fri Nov 26 13:47:17 2010
New Revision: 79553

Modified:
   pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
Log:
Add the _getid() method to ll2ctypes._parentable_mixin.  This lets
us return a more reasonable id for ll2ctypes objects.  Fixes
pypy.jit.backend.x86.test.test_basic.test_compute_unique_id.


Modified: pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	(original)
+++ pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	Fri Nov 26 13:47:17 2010
@@ -442,6 +442,9 @@
                             "not allocated from RPython at all")
         self._storage = None
 
+    def _getid(self):
+        return self._addressof_storage()
+
     def __eq__(self, other):
         if isinstance(other, _llgcopaque):
             addressof_other = other.intval



More information about the Pypy-commit mailing list