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).
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 thePtr{Uint8}
as anASCIIString
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).