mirror of https://github.com/python/cpython.git
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:
parent
5e6661bce9
commit
96e05b62e8
|
@ -353,7 +353,7 @@ remove_unusable_flags(PyObject *m)
|
||||||
}
|
}
|
||||||
#ifndef MS_WINDOWS_DESKTOP
|
#ifndef MS_WINDOWS_DESKTOP
|
||||||
info.dwOSVersionInfoSize = sizeof(info);
|
info.dwOSVersionInfoSize = sizeof(info);
|
||||||
if (!GetVersionExW((OSVERSIONINFOW*) &info)) {
|
if (!GetVersionEx((OSVERSIONINFO*) &info)) {
|
||||||
PyErr_SetFromWindowsErr(0);
|
PyErr_SetFromWindowsErr(0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue