From f10f56a6bfb658fd4814cad616620485cb3392fe Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 23 Sep 2009 09:04:45 +0000 Subject: [PATCH] Fix #3534: No need to flush the byte buffer when setting binary mode --- GHC/IO/Handle.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 1.7.10.4