Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: 
Changeset: r90830:7eb36df99c53
Date: 2017-03-28 11:20 +0200
http://bitbucket.org/pypy/pypy/changeset/7eb36df99c53/

Log:    Backed out changeset 2b7815180e1b

diff --git a/pypy/module/cpyext/test/test_typeobject.py 
b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -1223,3 +1223,25 @@
             pass
         bases = module.foo(C)
         assert bases == (A, B)
+
+    def test_multiple_inheritance_old_style_base(self):
+        module = self.import_extension('foo', [
+           ("foo", "METH_O",
+            '''
+                PyTypeObject *tp;
+                tp = (PyTypeObject*)args;
+                Py_INCREF(tp->tp_bases);
+                return tp->tp_bases;
+            '''
+            )])
+        # used to segfault after some iterations
+        for i in range(11):
+            print i
+            class A(object):
+                pass
+            class B:
+                pass
+            class C(A, B):
+                pass
+            bases = module.foo(C)
+            assert bases == (A, B)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to