[commit: base] master: Use utf8 when decoding cost centre strings (71157d6)
Simon Marlow
marlowsd at gmail.com
Wed Nov 30 14:48:06 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/71157d6870def4f5dd6bf9e2a0837888f4a55f66
>---------------------------------------------------------------
commit 71157d6870def4f5dd6bf9e2a0837888f4a55f66
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Nov 29 15:34:44 2011 +0000
Use utf8 when decoding cost centre strings
>---------------------------------------------------------------
GHC/Stack.hsc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/GHC/Stack.hsc b/GHC/Stack.hsc
index 38bd6f5..657a3d1 100644
--- a/GHC/Stack.hsc
+++ b/GHC/Stack.hsc
@@ -33,6 +33,8 @@ import Foreign.C
import GHC.IO
import GHC.Base
import GHC.Ptr
+import GHC.Foreign as GHC
+import GHC.IO.Encoding
#define PROFILING
#include "Rts.h"
@@ -71,8 +73,8 @@ currentCallStack = do
| ccs == nullPtr = return acc
| otherwise = do
cc <- ccsCC ccs
- lbl <- peekCAString =<< ccLabel cc
- mdl <- peekCString =<< ccModule cc
+ lbl <- GHC.peekCString utf8 =<< ccLabel cc
+ mdl <- GHC.peekCString utf8 =<< ccModule cc
parent <- ccsParent ccs
go parent ((mdl ++ '.':lbl) : acc)
--
More information about the Cvs-libraries
mailing list