Skip to content

Commit

Permalink
Document some examples of C wrappers using ccall
Browse files Browse the repository at this point in the history
- Remove references to JuliaLang#2818

- Explain when to use `Ptr{T}` and when to use `Ref{T}` correctly.
  `Ptr` is generally used for return types and fields of types mirroring
  C structs. `Ref` is generally used for input types, allowing memory
  managed by either C or Julia to be referenced by `ccall`.

- Provide some examples of C wrappers simplified from GSL.jl, with
  comments delineating the various parts of the `ccall`.

- Fix description of `cconvert` in the Auto-conversion section

- Better cross-referencing to the standard library

- Other minor formatting changes

Ref: JuliaMath/GSL.jl#43
  • Loading branch information
jiahao committed Feb 4, 2016
1 parent f020d38 commit a70ecdb
Showing 1 changed file with 201 additions and 83 deletions.
Loading

0 comments on commit a70ecdb

Please sign in to comment.