Hi, I need to pass a composite type to C and and get it back later, so I thought. Easy, get its pointer, send it in to C and recover it when need. But I'm totally puzzled with this result
julia> type foo a::Int; b::Int end julia> tp = foo(2,3) foo(2,3) julia> p = convert(Ptr{foo},[tp]) Ptr{foo} @0x000000002959fef0 julia> pt = unsafe_load(p) foo(687006336,0) julia> pt.a 687006336 What is happening here? Why isn't the data preserved?