Author: Matti Picus <[email protected]>
Branch: missing-tp_new
Changeset: r87885:b17ba1051274
Date: 2016-10-19 20:39 +0300
http://bitbucket.org/pypy/pypy/changeset/b17ba1051274/
Log: add assert that fails for an app-level typedef
diff --git a/pypy/module/cpyext/typeobject.py b/pypy/module/cpyext/typeobject.py
--- a/pypy/module/cpyext/typeobject.py
+++ b/pypy/module/cpyext/typeobject.py
@@ -247,6 +247,9 @@
# coming from a parent C type.
typedef = w_type.layout.typedef
+ if w_type is not space.w_object:
+ # XXX fix, to prevent problems with slot lookups
+ assert typedef is not space.w_object.layout.typedef
for method_name, slot_name, slot_names, slot_func in slotdefs_for_tp_slots:
w_descr = w_type.lookup(method_name)
if w_descr is None:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit