How to find the callback created with Python in FFI from my C++ function?
I want to async not only call the C++ functions in Python but return Python functions in my C++ functions to make callbacks. Example python script import ffi import exemplecpp def hello(): print("Hello world\n") hello_callback = ffi.callback("v", hello, "") exemplecpp.cppfunc(hello_callback) How in the usermodule to retrieve the callback as a function to use it in my cpp function mp_obj_t cppfunc(mp_obj_t func_obj) { ... func_obj(); ... return mp_const_none }
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.