auto self = cast(TestInterface)cast(Object) rawSelf
Works like a charm! Thank you both!
On 07/27/15 14:03, Vlad Leberstein via Digitalmars-d-learn wrote:
> Hi! My use case requires interaction with C API which in turn implies storing
> object instance reference as void *. I'm using gdc 4.9.2 and everything
> worked fine with "object -> void * -> object" conversion, but "object -> vo
On Monday, 27 July 2015 at 13:11:33 UTC, anonymous wrote:
In the first example, you pass a pointer to a class instance.
You cannot get the vtbl entry for the interface like this.
Instead try to do this in 2 steps:
actually i meant you pass an untyped pointer, so when you cast as
interface it'
On Monday, 27 July 2015 at 12:03:06 UTC, Vlad Leberstein wrote:
Hi! My use case requires interaction with C API which in turn
implies storing object instance reference as void *. I'm using
gdc 4.9.2 and everything worked fine with "object -> void * ->
object" conversion, but "object -> void * -
Hi! My use case requires interaction with C API which in turn
implies storing object instance reference as void *. I'm using
gdc 4.9.2 and everything worked fine with "object -> void * ->
object" conversion, but "object -> void * -> interface" failed.
The stripped-down example is something like