Unable to pass a D function member to a C callback
Luh
null at null.null
Sat Nov 2 20:42:29 UTC 2019
On Saturday, 2 November 2019 at 19:55:58 UTC, Dennis wrote:
> 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.
Yup that's it !
Many thanks !
More information about the Digitalmars-d-learn
mailing list