meson
meson copied to clipboard
Cython: emit `CYTHON_LIMITED_API`
If the user has specified the limited_api
keyword arg on an extension_module
invocation, then add CYTHON_LIMITED_API
to the C and C++ definitions of the target (along with the existing Py_LIMITED_API
).
Cython's support for this functionality was added in version 3.0, so we issue a warning if the detected Cython compiler is not at least this version.
Two tests have been added: one based on Cython's limited API test which aims to test that it works in the case of the user's compiler supporting this functionality, and another to test that a warning is issued in the opposite case.