blob: 035528090a152075849073a2009542c398249f0b (
plain)
1
2
3
4
5
6
|
Zig has @fieldParentPtr, but I'm not sure if it's memory safe, and it's
doesn't appears to be beginner friendly either.
One advantage of @fieldParentPtr vs C-style casting, is that
@fieldParentPtr allows a type to implement multiple interfaces
(with multiple vtables, which each can have a separate address).
|