projects
/
ghc-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a51dce
)
Use the result of writeCharBuf in GHC/IO/Encoding/Latin1.hs too
author
Ian Lynagh
<igloo@earth.li>
Fri, 10 Jul 2009 00:40:32 +0000
(
00:40
+0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 10 Jul 2009 00:40:32 +0000
(
00:40
+0000)
GHC/IO/Encoding/Latin1.hs
patch
|
blob
|
history
diff --git
a/GHC/IO/Encoding/Latin1.hs
b/GHC/IO/Encoding/Latin1.hs
index
99b2af3
..
97b198c
100644
(file)
--- a/
GHC/IO/Encoding/Latin1.hs
+++ b/
GHC/IO/Encoding/Latin1.hs
@@
-83,8
+83,8
@@
latin1_decode
| ow >= os || ir >= iw = done ir ow
| otherwise = do
c0 <- readWord8Buf iraw ir
| ow >= os || ir >= iw = done ir ow
| otherwise = do
c0 <- readWord8Buf iraw ir
- writeCharBuf oraw ow (unsafeChr (fromIntegral c0))
- loop (ir+1) (ow+1)
+ ow' <- writeCharBuf oraw ow (unsafeChr (fromIntegral c0))
+ loop (ir+1) ow'
-- lambda-lifted, to avoid thunks being built in the inner-loop:
done !ir !ow = return (if ir == iw then input{ bufL=0, bufR=0 }
-- lambda-lifted, to avoid thunks being built in the inner-loop:
done !ir !ow = return (if ir == iw then input{ bufL=0, bufR=0 }