Some good examples (look at unsafe_load and unsafe_store):

https://github.com/staticfloat/Nettle.jl/blob/master/src/hash.jl
https://github.com/JuliaAstro/WCSLIB.jl/blob/master/src/WCSLIB.jl




On Wed, Apr 9, 2014 at 7:27 PM, Dominique Orban
<[email protected]>wrote:

> Thanks for the reply. Is there an example I could look at? So far I've
> completely mirrored the struct. I can grab a Ptr to the main data structure
> but it's not clear to me how to access its members.
>
>
> On Wednesday, April 9, 2014 4:09:48 PM UTC-7, Keno Fischer wrote:
>
>> You need to mirror all fields up to and including the one you want to
>> access, but it's fine to replace arbitrary pointers by Ptr{Void}. Also note
>> that you currently should not attempt to pass structs to C by value since
>> that probably won't work (pointers are fine though).
>>
>>
>> On Wed, Apr 9, 2014 at 7:06 PM, Dominique Orban <[email protected]>wrote:
>>
>>> Oh, and some struct members are function pointers that I'd like to
>>> call...
>>>
>>
>>

Reply via email to