And this is exactly why I recommend against it in Passing a C struct into Julia .
Unless you are completely familar with all the layout, you should use the C types to pass data around, rather than trying to create julia arrays etc. Even if you do, it’s still less efficient to create those julia types in C. (and you can create the necessary C layout compatible julia types using “native” C or generic julia C api and it’s much better to use the native one.)
And again, if you have a pointer in your C struct, use a pointer in your julia struct as well.