JuliaLang/julia — pull request #8948 by stevengj (2014-11-09 01:15:15+00:00)
Title: update documentation for passing struct pointers to C

As discussed in #8551, this updates the documentation to better reflect how structs can be passed to/from C:

* If `&` is used in `ccall` with a *mutable* type, then changes to the value *are* reflected in Julia upon return.

* Non-opaque struct types can be passed as pointers by declaring the corresponding composite type in Julia and using `&`. Arrays of immutable types can be passed pointers to arrays of the corresponding Cstruct.

Note that, contrary to this section of the manual, commit 2f46ffd9c6fa5b2877cf5a7e3be5a9182c3c4dcc said that structs *can* be passed by value, confusingly by using `&`. @vtjnash, can you confirm this?