On Monday, 25 May 2020 at 08:39:23 UTC, John Burton wrote:

I believe that in D *this* is a reference to the
object and not a pointer like in C++.
So I think that writing &this might be what you need?

No. A class reference is a pointer under the hood. Getting its address will result in a pointer to the reference variable itself, not to the class instance. When passing a reference to a C API, casting it directly to the C type is correct.

Reply via email to