summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-04-16 08:57:10 +0200
committerStefan Behnel <stefan_ml@behnel.de>2021-04-16 08:57:10 +0200
commit66eb66f2f0c0cfa22942853659d444b6f4ecb799 (patch)
tree5de2abb5dc94748c894086df52aad99e96f69f7f
parent88bf3f072ef6711737728d01a85eab7992ca8101 (diff)
downloadcython-66eb66f2f0c0cfa22942853659d444b6f4ecb799.tar.gz
Disable __Pyx_PyType_Ready() usage in PyPy & friends where it fails to compile currently. They should generally be happy with their own implementation.
See https://github.com/cython/cython/pull/4107
-rw-r--r--Cython/Utility/ExtensionTypes.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
index 26bc2d9d9..29fc3440d 100644
--- a/Cython/Utility/ExtensionTypes.c
+++ b/Cython/Utility/ExtensionTypes.c
@@ -1,10 +1,16 @@
/////////////// PyType_Ready.proto ///////////////
-static int __Pyx_PyType_Ready(PyTypeObject *t);
+// FIXME: is this really suitable for CYTHON_COMPILING_IN_LIMITED_API?
+#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API
+static int __Pyx_PyType_Ready(PyTypeObject *t);/*proto*/
+#else
+#define __Pyx_PyType_Ready(t) PyType_Ready(t)
+#endif
/////////////// PyType_Ready ///////////////
//@requires: ObjectHandling.c::PyObjectCallNoArg
+#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API
// Wrapper around PyType_Ready() with some runtime checks and fixes
// to deal with multiple inheritance.
static int __Pyx_PyType_Ready(PyTypeObject *t) {
@@ -136,6 +142,7 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
return r;
}
+#endif
/////////////// PyTrashcan.proto ///////////////