[commit: packages/Win32] ghc-head: Replace PROCESSENTRY32 -> PROCESSENTRY32W (b5392c3)

git at git.haskell.org git at git.haskell.org
Tue Mar 18 10:16:07 UTC 2014


Repository : ssh://git@git.haskell.org/Win32

On branch  : ghc-head
Link       : http://git.haskell.org/packages/Win32.git/commitdiff/b5392c3d3bd761990d54fd0c37e3f259578d896c

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

commit b5392c3d3bd761990d54fd0c37e3f259578d896c
Author: Adrian Keet <arkeet at gmail.com>
Date:   Wed Nov 6 00:13:43 2013 -0800

    Replace PROCESSENTRY32 -> PROCESSENTRY32W


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

b5392c3d3bd761990d54fd0c37e3f259578d896c
 System/Win32/Process.hsc |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/System/Win32/Process.hsc b/System/Win32/Process.hsc
index e2f4ddf..cffc482 100644
--- a/System/Win32/Process.hsc
+++ b/System/Win32/Process.hsc
@@ -105,16 +105,16 @@ withTh32Snap f p = bracket (createToolhelp32Snapshot f p) (closeHandle)
 
 peekProcessEntry32 :: Ptr ProcessEntry32 -> IO ProcessEntry32
 peekProcessEntry32 buf = liftM5 (,,,,)
-    ((#peek PROCESSENTRY32, th32ProcessID) buf)
-    ((#peek PROCESSENTRY32, cntThreads) buf)
-    ((#peek PROCESSENTRY32, th32ParentProcessID) buf)
-    ((#peek PROCESSENTRY32, pcPriClassBase) buf)
-    (peekTString $ (#ptr PROCESSENTRY32, szExeFile) buf)
+    ((#peek PROCESSENTRY32W, th32ProcessID) buf)
+    ((#peek PROCESSENTRY32W, cntThreads) buf)
+    ((#peek PROCESSENTRY32W, th32ParentProcessID) buf)
+    ((#peek PROCESSENTRY32W, pcPriClassBase) buf)
+    (peekTString $ (#ptr PROCESSENTRY32W, szExeFile) buf)
 
 -- | Enumerate processes using Process32First and Process32Next
 th32SnapEnumProcesses :: Th32SnapHandle -> IO [ProcessEntry32]
-th32SnapEnumProcesses h = allocaBytes (#size PROCESSENTRY32) $ \pe -> do
-    (#poke PROCESSENTRY32, dwSize) pe ((#size PROCESSENTRY32)::DWORD)
+th32SnapEnumProcesses h = allocaBytes (#size PROCESSENTRY32W) $ \pe -> do
+    (#poke PROCESSENTRY32W, dwSize) pe ((#size PROCESSENTRY32W)::DWORD)
     ok <- c_Process32First h pe
     readAndNext ok pe []
     where



More information about the ghc-commits mailing list