Author: Armin Rigo <[email protected]>
Branch:
Changeset: r87994:d786616ec95b
Date: 2016-10-30 17:22 +0100
http://bitbucket.org/pypy/pypy/changeset/d786616ec95b/
Log: Don't check the *name* of an arbitrary app-level class!
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
@@ -274,7 +274,7 @@
if len(slot_names) == 1:
if not getattr(pto, slot_names[0]):
setattr(pto, slot_names[0], slot_func_helper)
- elif (w_type.getname(space) in ('list', 'tuple') and
+ elif ((w_type is space.w_list or w_type is space.w_tuple) and
slot_names[0] == 'c_tp_as_number'):
# XXX hack - hwo can we generalize this? The problem is method
# names like __mul__ map to more than one slot, and we have no
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit