Skip to content

Commit

Permalink
gh-102255: Use GetVersionEx instead of GetVersionExW to match argumen…
Browse files Browse the repository at this point in the history
…t type (GH-102583)

Since we pass a structure of type `OSVERSIONINFOEX`, we need to call
`GetVersionEx` instead of `GetVersionExW`.
  • Loading branch information
maxbachmann authored Mar 20, 2023
1 parent 5e6661b commit 96e05b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 96e05b6

Please sign in to comment.