From 56f4791493de53fd38835ab04e7205eccd43fd80 Mon Sep 17 00:00:00 2001 From: John Millikin Date: Mon, 4 Apr 2011 21:28:41 -0700 Subject: [PATCH] Use ``unsafeUseAsCString`` in ``withUTF8`` --- Text/XML/LibXML/SAX.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Text/XML/LibXML/SAX.hs b/Text/XML/LibXML/SAX.hs index d8244e9..e2bb313 100644 --- a/Text/XML/LibXML/SAX.hs +++ b/Text/XML/LibXML/SAX.hs @@ -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 -- 2.45.2