~singpolyma/haskell-libxml-sax

56f4791493de53fd38835ab04e7205eccd43fd80 — John Millikin 12 years ago dba80d7
Use ``unsafeUseAsCString`` in ``withUTF8``
1 files changed, 1 insertions(+), 1 deletions(-)

M Text/XML/LibXML/SAX.hs
M Text/XML/LibXML/SAX.hs => Text/XML/LibXML/SAX.hs +1 -1
@@ 558,7 558,7 @@ peekUTF8Len :: CStringLen -> IO T.Text
peekUTF8Len = fmap (TE.decodeUtf8) . B.packCStringLen

withUTF8 :: T.Text -> (CString -> IO a) -> IO a
withUTF8 = B.useAsCString . TE.encodeUtf8
withUTF8 = BU.unsafeUseAsCString . TE.encodeUtf8

freeFunPtr :: FunPtr a -> IO ()
freeFunPtr ptr = if ptr == nullFunPtr