[pypy-svn] r73812 - pypy/branch/cpython-extension/pypy/module/cpyext
afa at codespeak.net
afa at codespeak.net
Fri Apr 16 16:16:20 CEST 2010
Author: afa
Date: Fri Apr 16 16:15:56 2010
New Revision: 73812
Modified:
pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
Log:
more cleanup, thanks to the better bootstrapping method
Modified: pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py (original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/typeobject.py Fri Apr 16 16:15:56 2010
@@ -485,7 +485,7 @@
assert pto.c_tp_flags & Py_TPFLAGS_READYING == 0
pto.c_tp_flags |= Py_TPFLAGS_READYING
base = pto.c_tp_base
- if not base and not space.is_w(w_obj, space.w_object):
+ if not base:
base_pyo = make_ref(space, space.w_object, steal=True)
base = pto.c_tp_base = rffi.cast(PyTypeObjectPtr, base_pyo)
else:
@@ -504,9 +504,8 @@
PyPyType_Register(space, pto)
if base:
inherit_special(space, pto, base)
- if pto.c_tp_bases: # this is false while bootstrapping
- for w_base in space.fixedview(from_ref(space, pto.c_tp_bases)):
- inherit_slots(space, pto, w_base)
+ for w_base in space.fixedview(from_ref(space, pto.c_tp_bases)):
+ inherit_slots(space, pto, w_base)
# missing:
# setting __doc__ if not defined and tp_doc defined
# inheriting tp_as_* slots
More information about the Pypy-commit
mailing list