chetant / LibClang

Haskell FFI to libclang
Other
58 stars 10 forks source link

Remove remaining unsafe or ForeignPtr-based code from FFI.gc #22

Closed sethfowler closed 10 years ago

sethfowler commented 11 years ago

There are still a few types in FFI.gc that are manipulated unsafely. Before pushing anything to Hackage everything needs to be cleaned up.

sethfowler commented 10 years ago

Refactoring to use the phantom type parameter everywhere fixed most of these issues. UnsavedFile was the last place where we used ForeignPtr's for manual marshaling. We do still have a couple of references to ForeignPtr's in the code because Storable Vectors are implemented with ForeignPtr's internally, but we now let ByteStrings and Vectors take care of the real work.

I'd say this issue is fixed at this point.