gh-102255: Use GetVersionEx instead of GetVersionExW to match argument type (GH-102583)

Since we pass a structure of type `OSVERSIONINFOEX`, we need to call
`GetVersionEx` instead of `GetVersionExW`.
This commit is contained in:
Max Bachmann 2023-03-20 16:47:17 +01:00 committed by GitHub
parent 5e6661bce9
commit 96e05b62e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -353,7 +353,7 @@ remove_unusable_flags(PyObject *m)
}
#ifndef MS_WINDOWS_DESKTOP
info.dwOSVersionInfoSize = sizeof(info);
if (!GetVersionExW((OSVERSIONINFOW*) &info)) {
if (!GetVersionEx((OSVERSIONINFO*) &info)) {
PyErr_SetFromWindowsErr(0);
return -1;
}