Suppose we have a C library that takes a callback with inputs (Cint, 
Cfloat). The conventional way of creating a callback would be:

function foo(x::Cint, y::Cfloat)
# do something with x and y
return nothing
end
cfunction(foo, Void, (Cint, Cfloat))

The following alternative way also appears to work in v0.3 (but not v0.2, 
which blows up when accessing args). I'd like to know if this is a 
deliberate change and safe, or simply a coincidence that could be unsafe.

function bar(args::(Cint, Cfloat))
x, y = args
# do something with x and y
return nothing
end
cfunction(bar, Void, ((Cint, Cfloat),))

Thanks,
Jay

Reply via email to