Hi,

please don't top-post.

Mohamed Lrhazi wrote:
> In the example, the external C function is declared like this:
> 
> void find_cheeses(cheesefunc user_func, void *user_data)
> 
> and user_data is used to pass the pointer, to the Python function, to
> the lib, and the lib sends it back to the callback.
> 
> What if the external lib function expects just one value, and that is
> the pointer to a callback?

In that case, pass the pointer to the callback.

I imagine that your question implies: "how do I pass some state into the
callback function?". That depends on the library you are using, maybe it
passes something into the callback function that you can control from your
outside code.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to