Looks interesting. But what do i pass with ccall(:flip, Void, (mytype,), t)?  
When to use Ptr{Void} and when Ptr{mytype}?

On Thursday, January 8, 2015 4:22:37 PM UTC+1, Steven G. Johnson wrote:
>
>
>
> On Thursday, January 8, 2015 9:59:13 AM UTC-5, Andreas Lobinger wrote:
>>
>> Actually i do not want to pass by value. I thought composite types are 
>> references by a pointer (to the first element, like in C) and having mytype 
>> as the type of input parameter would pass the pointer to the library call? 
>>
>
> No, if you want to pass a pointer, then you should declare it as such:
>
> t = mytype(0,0)
> ccall(:flip, Void, (Ptr{mytype},), &t)
>

Reply via email to