Hi all,
I'm currently experimenting with CYTHON_LIMITED_API and am having issues getting things to work even for simple Cython code. I've set up a minimal example package here:
and running:
pip wheel .
at the root of the repository results in many warnings and errors (I am using Python 3.10 in case that matters), such as:
test_cython/example.c:1442:12: error: implicit declaration of function 'PyMethod_New' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return PyMethod_New(func, self);
^
test_cython/example.c:1442:12: note: did you mean 'PySet_New'?
/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/setobject.h:80:24: note: 'PySet_New' declared here
PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
^
test_cython/example.c:1442:12: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion]
return PyMethod_New(func, self);
^~~~~~~~~~~~~~~~~~~~~~~~
test_cython/example.c:1485:5: error: unknown type name 'PyCMethodObject'; did you mean 'PyCodeObject'?
PyCMethodObject func;
^~~~~~~~~~~~~~~
PyCodeObject
I know that support for CYTHON_LIMITED_API is at an early stage, but I was curious about whether it would be possible to get a simple example working. Can anyone see what I might be doing wrong above?
Thanks!
Tom