From df1779036dfeb32a774ff212e3267fcdd2dab890 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Sun, 15 Aug 2010 14:51:27 +0000 Subject: [PATCH] Add a missing castPtr (only shows up in -DDEBUG) --- GHC/IO/Encoding/UTF16.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GHC/IO/Encoding/UTF16.hs b/GHC/IO/Encoding/UTF16.hs index d44259f..1f27bb1 100644 --- a/GHC/IO/Encoding/UTF16.hs +++ b/GHC/IO/Encoding/UTF16.hs @@ -48,10 +48,11 @@ import GHC.IORef import System.Posix.Internals import Foreign.C import GHC.Show +import GHC.Ptr puts :: String -> IO () puts s = do withCStringLen (s++"\n") $ \(p,len) -> - c_write 1 p (fromIntegral len) + c_write 1 (castPtr p) (fromIntegral len) return () #endif -- 1.7.10.4