[commit: base] encoding: Add peekFilePath and peekFilePathLen for dependents (b541067)

Max Bolingbroke batterseapower at hotmail.com
Tue Apr 5 10:05:25 CEST 2011


Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : encoding

http://hackage.haskell.org/trac/ghc/changeset/b5410676722f452cc20f885f4d088c93b140dfed

>---------------------------------------------------------------

commit b5410676722f452cc20f885f4d088c93b140dfed
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date:   Tue Apr 5 09:05:06 2011 +0100

    Add peekFilePath and peekFilePathLen for dependents

>---------------------------------------------------------------

 System/Posix/Internals.hs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/System/Posix/Internals.hs b/System/Posix/Internals.hs
index 971dc17..746a0e0 100644
--- a/System/Posix/Internals.hs
+++ b/System/Posix/Internals.hs
@@ -177,13 +177,25 @@ fdGetMode fd = do
 #ifdef mingw32_HOST_OS
 withFilePath :: FilePath -> (CWString -> IO a) -> IO a
 withFilePath = withCWString
+
+peekFilePath :: CWString -> IO FilePath
+peekFilePath = peekCWString
 #else
+
 withFilePath :: FilePath -> (CString -> IO a) -> IO a
+peekFilePath :: CString -> IO FilePath
+peekFilePathLen :: CStringLen -> IO FilePath
+
 #if __GLASGOW_HASKELL__
 withFilePath = GHC.withCString fileSystemEncoding
+peekFilePath = GHC.peekCString fileSystemEncoding
+peekFilePathLen = GHC.peekCStringLen fileSystemEncoding
 #else
 withFilePath = withCString
+peekFilePath = peekCString
+peekFilePathLen = peekCStringLen
 #endif
+
 #endif
 
 -- ---------------------------------------------------------------------------





More information about the Cvs-libraries mailing list