when I read a typelib, I can call any callable described in a GICallableInfo with its method g_callable_info_invoke. In order to do that, GICallableInfo gives enough information and what to pass and what to receive, and then g_callable_info_invoke does the job.
That’s as far as I went! Then there is girffi within libgirepository and then there is libffi.
I’d like a simple example showing how to use all of this together (reading the python bindings is just too much work to answer this question), and understand the benefits of using it instead of the invoke method directly.
I’ve read somewhere it’s faster because I can cache the call. But if I have to build the arguments each time I want to use an ffi_cif, what’s the benefit?
So examples and explanations would be most welcome.