Maybe. The question was rather, if in the meanwhile something as macros etc. showed up.
My example is a c struct with different c -types → Long + 2 Doubles (so 4bytes and 2*8bytes) and i learned that you should not expect julia to allocate in consecutive memory.
As long as you know how the macros expand (I assume you’re talking about C macros here), then you shouldn’t have a problem, as Julia structs should match C structs in layout.
The cairo hacks are to work around C unions, which can’t be represented by Julia at the moment.
I think there might be some confusion here, so maybe it helps to be specific about the points of discussion and the struct layout…
The struct below has the same layout as such a struct in C.
struct LobingerAStruct
x::Clong
y::Cdouble
z::Cdouble
end
The point of the example I shared is that you can store these non-mutable struct objects in an Array and treat the memory as consecutive (respecting the usual ccall memory rules for passing arrays).
I think the point of the macros you are referring to is to make working with immutable structs easier in general, but that is a bit orthogonal to whether it is possible to pass an array of structs to C without a shim.