diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 1089ae3..0fe3963 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1390,7 +1390,7 @@ attributes_from_dir_w(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG * } /* Grab GetFinalPathNameByHandle dynamically from kernel32 */ -static int has_GetFinalPathNameByHandle = 0; +static int has_GetFinalPathNameByHandle = -1; static DWORD (CALLBACK *Py_GetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD, DWORD); static int @@ -1401,7 +1401,7 @@ check_GetFinalPathNameByHandle() DWORD); /* only recheck */ - if (!has_GetFinalPathNameByHandle) + if (-1 == has_GetFinalPathNameByHandle) { hKernel32 = GetModuleHandleW(L"KERNEL32"); *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32, |