There are some significant changes to the behavior of ccall and cfunction
that are in the process of being merged into master. Most of it is
backwards-compatible, although there a few important changes to note.

If you are not a package maintainer, you may want to wait a week before
attempting to upgrade to the latest master. Or stick with the v0.3 stable
release.

The task-driver PR is: https://github.com/JuliaLang/julia/pull/7906

You can find a short description of the update in the NEWS:
https://github.com/JuliaLang/julia/pull/7906/files?short_path=8312ad0#diff-8312ad0561ef661716b48d09478362f3

The calling-c-and-fortran-code section of the manual also has had a
substantial rewrite to be generally more informative and helpful:
https://github.com/JuliaLang/julia/blob/jn/ccall3/doc/manual/calling-c-and-fortran-code.rst

There are two primary sources of API breakage that you may encounter:

   - most convert(Ptr{T}, ::Any) methods have been moved to become methods
   of unsafe_convert
   - the cfunction API now interprets its list of argument types in the
   same manner as ccall. isbits types and Any are unaffected by this
   change. other types now need to be wrapped in a Ref{...} declaration
   - incorrectly declared ccall arguments may suddenly cease to work. for
   example, a bitstype is distinct from a structtype on some platforms, so
   passing a WrapperType declared immutable WrapperType; child::Cint; end
   to an argument expecting an int on the C side will stop working
   correctly. this also applies to return values and cfunction.

​

Reply via email to