summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cython/Utility/ExtensionTypes.c11
-rw-r--r--tests/run/special_methods_T561.pyx4
2 files changed, 12 insertions, 3 deletions
diff --git a/Cython/Utility/ExtensionTypes.c b/Cython/Utility/ExtensionTypes.c
index e19df8578..fdf556370 100644
--- a/Cython/Utility/ExtensionTypes.c
+++ b/Cython/Utility/ExtensionTypes.c
@@ -151,14 +151,21 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs
/////////////// PyType_Ready.proto ///////////////
+=======
+// FIXME: is this really suitable for CYTHON_COMPILING_IN_LIMITED_API?
+#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_USE_TYPE_SPECS
-static int __Pyx_PyType_Ready(PyTypeObject *t);
+static int __Pyx_PyType_Ready(PyTypeObject *t);/*proto*/
+#endif
+#else
+#define __Pyx_PyType_Ready(t) PyType_Ready(t)
#endif
/////////////// PyType_Ready ///////////////
//@requires: ObjectHandling.c::PyObjectCallNoArg
//@requires: ValidateBasesTuple
+#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.
#if !CYTHON_USE_TYPE_SPECS
@@ -242,6 +249,8 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
return r;
}
#endif
+#endif
+
/////////////// PyTrashcan.proto ///////////////
diff --git a/tests/run/special_methods_T561.pyx b/tests/run/special_methods_T561.pyx
index 5995c3fdd..a8945e662 100644
--- a/tests/run/special_methods_T561.pyx
+++ b/tests/run/special_methods_T561.pyx
@@ -1,6 +1,6 @@
# mode: run
-# ticket: tt561
-# ticket: tt3
+# ticket: t561
+# ticket: t3
# The patch in #561 changes code generation for most special methods
# to remove the Cython-generated wrapper and let PyType_Ready()