[pypy-svn] r58249 - pypy/branch/tuple-nonresizable-395/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Sat Sep 20 11:58:54 CEST 2008
Author: arigo
Date: Sat Sep 20 11:58:53 2008
New Revision: 58249
Modified:
pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typeobject.py
pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typetype.py
Log:
Make W_TypeObject.mro_w a non-resizable list.
Modified: pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typeobject.py (original)
+++ pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typeobject.py Sat Sep 20 11:58:53 2008
@@ -545,10 +545,10 @@
if not space.is_w(w_where, space.w_type):
w_mro_meth = space.get(w_mro_func, w_self)
w_mro = space.call_function(w_mro_meth)
- w_self.mro_w = space.unpackiterable(w_mro)
+ w_self.mro_w = space.viewiterable(w_mro)
# do some checking here
return # done
- w_self.mro_w = w_self.compute_default_mro()
+ w_self.mro_w = w_self.compute_default_mro()[:]
# ____________________________________________________________
Modified: pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typetype.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typetype.py (original)
+++ pypy/branch/tuple-nonresizable-395/pypy/objspace/std/typetype.py Sat Sep 20 11:58:53 2008
@@ -80,7 +80,7 @@
def descr_get__mro__(space, w_type):
w_type = _check(space, w_type)
- return space.newtuple(w_type.mro_w[:])
+ return space.newtuple(w_type.mro_w)
def descr_mro(space, w_type):
"""Return a type's method resolution order."""
More information about the Pypy-commit
mailing list