Author: Matti Picus <[email protected]>
Branch: py3.5
Changeset: r89080:f145455a15e5
Date: 2016-12-16 00:11 +0200
http://bitbucket.org/pypy/pypy/changeset/f145455a15e5/

Log:    hack at test to pass on cpython3.5, still fails on py3.5

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
@@ -1148,9 +1148,19 @@
                 Base1->tp_basicsize = sizeof(PyHeapTypeObject);
                 Base2->tp_basicsize = sizeof(PyHeapTypeObject);
                 Base12->tp_basicsize = sizeof(PyHeapTypeObject);
+                #ifndef PYPY_VERSION /* PyHeapTypeObject has no ht_qualname on 
PyPy */
+                #if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+                {
+                  PyObject * dummyname = PyBytes_FromString("dummy name");
+                  ((PyHeapTypeObject*)Base1)->ht_qualname = dummyname;
+                  ((PyHeapTypeObject*)Base2)->ht_qualname = dummyname;
+                  ((PyHeapTypeObject*)Base12)->ht_qualname = dummyname;
+                }
+                #endif 
+                #endif 
                 Base1->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | 
Py_TPFLAGS_HEAPTYPE;
                 Base2->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | 
Py_TPFLAGS_HEAPTYPE;
-                Base12->tp_flags = Py_TPFLAGS_DEFAULT;
+                Base12->tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HEAPTYPE;
                 Base12->tp_base = Base1;
                 Base12->tp_bases = PyTuple_Pack(2, Base1, Base2);
                 Base12->tp_doc = "The Base12 type or object";
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to