From c2bb98f417b0f04d54a050947a7624235ca59ef9 Mon Sep 17 00:00:00 2001 From: stolz Date: Fri, 12 Nov 2004 17:08:58 +0000 Subject: [project @ 2004-11-12 17:08:58 by stolz] Fix FFI-funniness, cf. http://www.haskell.org/pipermail/glasgow-haskell-users/2002-February/003020.html Noticed by: George Russell (again) --- System/Posix/Env.hsc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'System/Posix/Env.hsc') diff --git a/System/Posix/Env.hsc b/System/Posix/Env.hsc index 1c85805..f1ec317 100644 --- a/System/Posix/Env.hsc +++ b/System/Posix/Env.hsc @@ -55,12 +55,11 @@ foreign import ccall unsafe "getenv" getEnvironmentPrim :: IO [String] getEnvironmentPrim = do - c_environ <- peek c_environ_p - arr <- peekArray0 nullPtr c_environ + arr <- peekArray0 nullPtr c_environ_p mapM peekCString arr foreign import ccall unsafe "&environ" - c_environ_p :: Ptr (Ptr CString) + c_environ_p :: Ptr CString -- |'getEnvironment' retrieves the entire environment as a -- list of @(key,value)@ pairs. -- cgit v1.2.3