0

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 *)
2
  • What if you do from cpython.ref cimport PyObject first? Commented Jun 26, 2023 at 18:21
  • Yeah, I did that. Commented Jun 27, 2023 at 2:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.