diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2021-04-17 09:10:08 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-04-17 09:10:08 +0200 |
commit | 2d2dbf0f2ec7ee29126816d9d2ada7115fcfe05e (patch) | |
tree | 75e2dda276fb33067bac2e88ac894508b8111f97 | |
parent | b643850a12f2065ce71ddcea5b105c28444fbce9 (diff) | |
parent | 66eb66f2f0c0cfa22942853659d444b6f4ecb799 (diff) | |
download | cython-2d2dbf0f2ec7ee29126816d9d2ada7115fcfe05e.tar.gz |
Merge branch 'master' into clean_up_capi_features
-rw-r--r-- | Cython/Utility/ExtensionTypes.c | 11 | ||||
-rw-r--r-- | tests/run/special_methods_T561.pyx | 4 |
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() |