You can't, because that's how inheritance works in Nim. The C code you have there is not actually a parent child relationship, there is no connection between the Parent and Child structs.
- How to prevent nim generate C code access parent type through `Sup... Dabod
- How to prevent nim generate C code access parent type through... PMunch
