Can you be more specific? What happens if you don't use `Ref`?

`Ref` is clearly wrong given the callback signature you provide.

Also, you may want to use `Cuint` as type instead of `UInt32`.

-erik

On Mon, Feb 1, 2016 at 12:50 AM, Bryan Rivera <[email protected]> wrote:
> For some reason I need to specify Ref{UInt32} instead of just UInt32.
> Float64 does not seem to require the same.
>
> Can anyone explain this behavior?
>
> function callbackfun(a::UInt32, b::Float64, c::UInt32)
>     ...
> end
>
> cfunction(callbackfun, Void, (Ref{UInt32},Float64,Ref{UInt32}))
>
>
> typedef void (*CALLBACKFUN)(unsigned int z, double b, unsigned int c);
>
>
>



-- 
Erik Schnetter <[email protected]>
http://www.perimeterinstitute.ca/personal/eschnetter/

Reply via email to