How to type `PyObject* const*` in Cython

44 views Asked by At

Let's take this as an example: reference

The definition of the type _PyCFunctionFastWithKeywords is:

PyObject *_PyCFunctionFastWithKeywords(PyObject *self,
                                       PyObject *const *args,
                                       Py_ssize_t nargs,
                                       PyObject *kwnames);

How do I type PyObject *const * in Cython?

Doing this does not work:

ctypedef PyObject *(*_PyCFunctionFastWithKeywords)(PyObject *, PyObject *const *, Py_ssize_t, PyObject *)
0

There are 0 answers