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 *)
from cpython.ref cimport PyObjectfirst?