Repository : ssh://darcs.haskell.org//srv/darcs/packages/haskeline On branch : master
http://hackage.haskell.org/trac/ghc/changeset/0adbe5783d7cd121c314a8a3dd450a250d99b10c >--------------------------------------------------------------- commit 0adbe5783d7cd121c314a8a3dd450a250d99b10c Author: Max Bolingbroke <[email protected]> Date: Mon Apr 11 21:16:21 2011 +0000 Use CAString functions to marshal locale names >--------------------------------------------------------------- System/Console/Haskeline/Backend/IConv.hsc | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/System/Console/Haskeline/Backend/IConv.hsc b/System/Console/Haskeline/Backend/IConv.hsc index 5544143..a217ac4 100644 --- a/System/Console/Haskeline/Backend/IConv.hsc +++ b/System/Console/Haskeline/Backend/IConv.hsc @@ -65,8 +65,8 @@ openPartialDecoder codeset = do foreign import ccall "setlocale" c_setlocale :: CInt -> CString -> IO CString setLocale :: Maybe String -> IO (Maybe String) -setLocale oldLocale = (maybeWith withCString) oldLocale $ \loc_p -> do - c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCString +setLocale oldLocale = (maybeWith withCAString) oldLocale $ \loc_p -> do + c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCAString ----------------- -- Getting the encoding @@ -77,7 +77,7 @@ foreign import ccall nl_langinfo :: NLItem -> IO CString getCodeset :: IO String getCodeset = do - str <- nl_langinfo (#const CODESET) >>= peekCString + str <- nl_langinfo (#const CODESET) >>= peekCAString -- check for codesets which may be returned by Solaris, but not understood -- by GNU iconv. if str `elem` ["","646"] @@ -95,8 +95,8 @@ foreign import ccall "h_iconv_open" iconv_open :: CString -> CString -> IO IConvTPtr iconvOpen :: String -> String -> IO IConvT -iconvOpen destName srcName = withCString destName $ \dest -> - withCString srcName $ \src -> do +iconvOpen destName srcName = withCAString destName $ \dest -> + withCAString srcName $ \src -> do res <- iconv_open dest src if res == nullPtr `plusPtr` (-1) then throwErrno $ "iconvOpen " _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
