diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-01-14 16:54:09 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-01-14 16:54:09 (GMT) |
commit | 50590f111b14090eacf536280287d2d1743c6a88 (patch) | |
tree | fc18378eba7c109ff4673e28944452620f4aaa3e /Modules/posixmodule.c | |
parent | d61fdc17d38e4ef32505187b81c40c5afd59c3e3 (diff) | |
download | cpython-50590f111b14090eacf536280287d2d1743c6a88.zip cpython-50590f111b14090eacf536280287d2d1743c6a88.tar.gz cpython-50590f111b14090eacf536280287d2d1743c6a88.tar.bz2 |
Use GetModuleHandleW to avoid *A functions where possible.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index a71d2e6..61a0439 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1155,7 +1155,7 @@ check_GetFinalPathNameByHandle() /* only recheck */ if (!has_GetFinalPathNameByHandle) { - hKernel32 = GetModuleHandle("KERNEL32"); + hKernel32 = GetModuleHandleW(L"KERNEL32"); *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32, "GetFinalPathNameByHandleA"); *(FARPROC*)&Py_GetFinalPathNameByHandleW = GetProcAddress(hKernel32, @@ -6526,7 +6526,7 @@ check_CreateSymbolicLinkW() /* only recheck */ if (has_CreateSymbolicLinkW) return has_CreateSymbolicLinkW; - hKernel32 = GetModuleHandle("KERNEL32"); + hKernel32 = GetModuleHandleW(L"KERNEL32"); *(FARPROC*)&Py_CreateSymbolicLinkW = GetProcAddress(hKernel32, "CreateSymbolicLinkW"); if (Py_CreateSymbolicLinkW) @@ -9365,7 +9365,7 @@ win32_urandom(PyObject *self, PyObject *args) /* Obtain handle to the DLL containing CryptoAPI This should not fail */ - hAdvAPI32 = GetModuleHandle("advapi32.dll"); + hAdvAPI32 = GetModuleHandleW(L"advapi32.dll"); if(hAdvAPI32 == NULL) return win32_error("GetModuleHandle", NULL); |