[pypy-svn] r4956 - pypy/branch/src-newobjectmodel/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Sat Jun 5 14:32:24 CEST 2004


Author: arigo
Date: Sat Jun  5 14:32:24 2004
New Revision: 4956

Modified:
   pypy/branch/src-newobjectmodel/pypy/objspace/std/objspace.py
Log:
Minor fix for CPythonObject.


Modified: pypy/branch/src-newobjectmodel/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/objspace/std/objspace.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/objspace/std/objspace.py	Sat Jun  5 14:32:24 2004
@@ -223,7 +223,7 @@
         import cpythonobject
         SlotWrapperType = type(type(None).__repr__)
         if isinstance(x, (types.FunctionType, types.BuiltinFunctionType, SlotWrapperType)):
-            return cpythonobject.W_BuiltinFunctionObject(self, x) 
+            return cpythonobject.W_BuiltinFunctionObject(self, x)
         #print "cpython wrapping %r (%s)" % (x, type(x))
         #if hasattr(x, '__bases__'): 
         #    print "cpython wrapping a class %r (%s)" % (x, type(x))
@@ -287,7 +287,7 @@
             return w_type.lookup(name)
         else:
             # hack
-            for cls in w_obj.cpyobj.__class__.__mro__:
+            for cls in type(w_obj.cpyobj).__mro__:
                 if name in cls.__dict__:
                     return self.wrap(cls.__dict__[name])
             return None



More information about the Pypy-commit mailing list