Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/040313eb7d79aca47cb897479c6bca1af5e2ffb3 >--------------------------------------------------------------- commit 040313eb7d79aca47cb897479c6bca1af5e2ffb3 Author: Joey Adams <[email protected]> Date: Mon Dec 24 12:44:22 2012 -0500 BufferedIO: fix bug in writeBufNonBlocking introduced by commit 7d39e100 bufferAdjustL does nothing but update bufL, and set bufL = bufR = 0 when bufL == bufR. It ignores the old bufL. writeBufNonBlocking is currently unused. It is only used to implement flushWriteBuffer0, which is never called by base (hPutBufNonBlocking uses a blocking flush). >--------------------------------------------------------------- GHC/IO/BufferedIO.hs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/GHC/IO/BufferedIO.hs b/GHC/IO/BufferedIO.hs index ef78d90..b715c61 100644 --- a/GHC/IO/BufferedIO.hs +++ b/GHC/IO/BufferedIO.hs @@ -123,5 +123,5 @@ writeBufNonBlocking dev bbuf = do let bytes = bufferElems bbuf res <- withBuffer bbuf $ \ptr -> IODevice.writeNonBlocking dev (ptr `plusPtr` bufL bbuf) bytes - return (res, bufferAdjustL res bbuf) + return (res, bufferAdjustL (bufL bbuf + res) bbuf) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
