[Python-checkins] gh-102255: Use GetVersionEx instead of GetVersionExW to match argument type (GH-102583)
zooba
webhook-mailer at python.org
Mon Mar 20 11:47:27 EDT 2023
https://github.com/python/cpython/commit/96e05b62e827a6dee6c658fea9b4976dfd8d30e3
commit: 96e05b62e827a6dee6c658fea9b4976dfd8d30e3
branch: main
author: Max Bachmann <kontakt at maxbachmann.de>
committer: zooba <steve.dower at microsoft.com>
date: 2023-03-20T15:47:17Z
summary:
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`.
files:
M Modules/socketmodule.c
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index b7927750e334..6a6f8cf7392e 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;
}
More information about the Python-checkins
mailing list