JuliaLang/julia — pull request #5677 by stevengj (2014-02-04 17:48:09+00:00)
Title: call bytestring on String arguments in ccalls that require Ptr{Uint8} conversion

The basic issue is that `String` arguments need to be passed through `bytestring` before being converted to `Ptr{Uint8}` by `ccall`. This should have no overhead for the common cases since `bytestring(s::ByteString) = s` should be inlined.

Among other things, this fixes #5673, and subsumes #5675.