News for hackers. Stuff that matters.
Re:Learning that you can use unions in C for grouping things... by thaumasiotes on Sunday August 01, 2021 @03:29PM (#28029109)
Based on the writeup, this technique isn't really about enabling you to start writing `s.position.x` where the old code would have written `s.x`. If that were all you wanted, you'd just keep writing `s.x`. It's about enabling you to write `s.x` everywhere, in old code and new code, while also being able to pass `s.position` to memcpy calls. You're never supposed to write `s.position.x`.

There are no comments on this comment yet.