[pypy-svn] r61678 - pypy/trunk/lib-python/modified-2.5.2/ctypes

afa at codespeak.net afa at codespeak.net
Mon Feb 9 20:42:22 CET 2009


Author: afa
Date: Mon Feb  9 20:42:19 2009
New Revision: 61678

Modified:
   pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py
Log:
Fix repr of CDLL objects: self._handle is a class, not an address!


Modified: pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/ctypes/__init__.py	Mon Feb  9 20:42:19 2009
@@ -350,9 +350,9 @@
             self._handle = handle
 
     def __repr__(self):
-        return "<%s '%s', handle %x at %x>" % \
+        return "<%s '%s', handle %s at %x>" % \
                (self.__class__.__name__, self._name,
-                (self._handle & (_sys.maxint*2 + 1)),
+                self._handle,
                 id(self) & (_sys.maxint*2 + 1))
 
     def __getattr__(self, name):



More information about the Pypy-commit mailing list