Unable to pass a D function member to a C callback
Dennis
dkorpel at gmail.com
Sat Nov 2 19:55:58 UTC 2019
On Saturday, 2 November 2019 at 19:42:54 UTC, Luh wrote:
> So I think I just can't. :(
Is that `void* c` in the callback a context pointer by any chance?
That's a common thing in C callbacks precisely for purposes like
this.
You can cast your class to a void* when you register the callback
and in the callback function cast it back to a class and call
process on that.
I don't know what C library you're working with so can't give you
specifics.
More information about the Digitalmars-d-learn
mailing list