JuliaAstro / FITSIO.jl

Flexible Image Transport System (FITS) file support for Julia
http://juliaastro.org/FITSIO.jl/
MIT License
55 stars 29 forks source link

wrap fits_hdr2str() #8

Closed kbarbary closed 10 years ago

kbarbary commented 10 years ago

One more function.

This is important for using a WCS library, where the WCS is initialized from a header string.

I realized that bytestring creates a copy, meaning that the entire header string will be copied, seemingly unnecessarily. I don't know how to avoid this though... seems that it would require telling julia to reinterpret the Ptr{Uint8} as an ASCIIString and also to take ownership of it. It wasn't quite clear to me from the C interface docs if this is possible (or for that matter, recommended).