Generating callbacks for a c library #1631
-
I'd like to generate functions like |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
FWIW here is a more detailed example https://numba.readthedocs.io/en/stable/user/cfunc.html#dealing-with-pointers-and-array-memory |
Beta Was this translation helpful? Give feedback.
-
Sorry, this discussion seems to have been missed. The functions that are generated can be used elsewhere as they are just basic C/Fortran functions, however I'm not sure if the input types would match what you would expect. E.g. for |
Beta Was this translation helpful? Give feedback.
-
For |
Beta Was this translation helpful? Give feedback.
-
We have not implemented proper callback-functions as documented here: This is something that I would quite like to do as it would allow us to expose functions which take functions as arguments (currently they are translated but not wrapped. I hadn't realised that there was a standard way to do this. |
Beta Was this translation helpful? Give feedback.
We have not implemented proper callback-functions as documented here:
https://docs.python.org/3/library/ctypes.html#callback-functions
This is something that I would quite like to do as it would allow us to expose functions which take functions as arguments (currently they are translated but not wrapped. I hadn't realised that there was a standard way to do this.