[pypy-commit] pypy default: revert parts of 8db3b9a6b0a2 for -A tests

mattip pypy.commits at gmail.com
Sun Mar 26 15:50:45 EDT 2017


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r90817:be8d848b5214
Date: 2017-03-26 21:51 +0300
http://bitbucket.org/pypy/pypy/changeset/be8d848b5214/

Log:	revert parts of 8db3b9a6b0a2 for -A tests

diff --git a/pypy/module/cpyext/test/comparisons.c b/pypy/module/cpyext/test/comparisons.c
--- a/pypy/module/cpyext/test/comparisons.c
+++ b/pypy/module/cpyext/test/comparisons.c
@@ -64,7 +64,7 @@
     0,                                              /* tp_dictoffset */
     0,                                              /* tp_init */
     0,                                              /* tp_alloc */
-    0,                                              /* tp_new */
+    PyType_GenericNew,                              /* tp_new */
     0                                               /* tp_free */
 };
 
@@ -108,6 +108,8 @@
 {
     PyObject *m, *d;
 
+    OldCmpType.tp_new = &PyType_GenericNew;
+
     if (PyType_Ready(&CmpType) < 0)
         return;
     if (PyType_Ready(&OldCmpType) < 0)
diff --git a/pypy/module/cpyext/test/foo.c b/pypy/module/cpyext/test/foo.c
--- a/pypy/module/cpyext/test/foo.c
+++ b/pypy/module/cpyext/test/foo.c
@@ -592,7 +592,7 @@
 
     0,          /*tp_init*/
     0,          /*tp_alloc  will be set to PyType_GenericAlloc in module init*/
-    0,          /*tp_new*/
+    PyType_GenericNew, /*tp_new*/
     0,          /*tp_free  Low-level free-memory routine */
     0,          /*tp_is_gc For PyObject_IS_GC */
     0,          /*tp_bases*/
@@ -710,6 +710,8 @@
     UnicodeSubtype2.tp_base = &UnicodeSubtype;
     MetaType.tp_base = &PyType_Type;
 
+    InitErrType.tp_new = PyType_GenericNew;
+
     if (PyType_Ready(&fooType) < 0)
         INITERROR;
     if (PyType_Ready(&UnicodeSubtype) < 0)


More information about the pypy-commit mailing list