Add a missing castPtr (only shows up in -DDEBUG)
authorsimonpj@microsoft.com <unknown>
Sun, 15 Aug 2010 14:51:27 +0000 (14:51 +0000)
committersimonpj@microsoft.com <unknown>
Sun, 15 Aug 2010 14:51:27 +0000 (14:51 +0000)
GHC/IO/Encoding/UTF16.hs

index d44259f..1f27bb1 100644 (file)
@@ -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