Pass a ref to tuple to ccall

You can’t expect c to change when it is immutable. Try

c = Ref(NTuple{4,UInt8}((0,0,0,0))
ccall(...)
return c[]

(Calling C and Fortran Code · The Julia Language)

3 Likes