Hi, I gather this is a often-discussed topic but I've not been able to find a sufficiently explicit example to get me going. I'm looking to interact with a C library. I'm able to make simple ccall() calls but in order to set things up, I need to be able to read from and write to the main data structure, which is a fairly complicated C struct. This struct has members who are themselves structs, enums, etc. I only need to access a few of them, but they are sometimes 2 or 3 levels deep. Is there a good example out there to look at for inspiration?
Say the main data structure is data. Here are a few example operations I'd need to do: * read a scalar value data.x * read a float array data.y * read a scalar value data.member.x * assign a float array to data.y Some questions relating to defining a Julia type that mirrors the C struct: * does the Julia type need to mirror all members of the C struct, or only those I'll access? * if I don't access a certain member that is itself a pointer to a C struct, is it safe to pretend it is a void*? I could write an intermediate C interface, but I was hoping for a pure Julia solution. Thanks in advance!