From: Simon Marlow Date: Wed, 23 Sep 2009 09:04:45 +0000 (+0000) Subject: Fix #3534: No need to flush the byte buffer when setting binary mode X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f10f56a6bfb658fd4814cad616620485cb3392fe;p=ghc-base.git Fix #3534: No need to flush the byte buffer when setting binary mode --- diff --git a/GHC/IO/Handle.hs b/GHC/IO/Handle.hs index b3c780e..a8af17c 100644 --- a/GHC/IO/Handle.hs +++ b/GHC/IO/Handle.hs @@ -551,7 +551,7 @@ hSetBinaryMode :: Handle -> Bool -> IO () hSetBinaryMode handle bin = withAllHandles__ "hSetBinaryMode" handle $ \ h_@Handle__{..} -> do - flushBuffer h_ + flushCharBuffer h_ let mb_te | bin = Nothing | otherwise = Just localeEncoding