summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorMax Bachmann <kontakt@maxbachmann.de>2023-03-20 15:47:17 (GMT)
committerGitHub <noreply@github.com>2023-03-20 15:47:17 (GMT)
commit96e05b62e827a6dee6c658fea9b4976dfd8d30e3 (patch)
tree7cc95dbe7e79bd4223b12248cee639949488107c /Modules/socketmodule.c
parent5e6661bce968173fa45b74fa2111098645ff609c (diff)
downloadcpython-96e05b62e827a6dee6c658fea9b4976dfd8d30e3.zip
cpython-96e05b62e827a6dee6c658fea9b4976dfd8d30e3.tar.gz
cpython-96e05b62e827a6dee6c658fea9b4976dfd8d30e3.tar.bz2
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`.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index b792775..6a6f8cf 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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;
}