]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102255: Use GetVersionEx instead of GetVersionExW to match argument type (GH-102583)
authorMax Bachmann <kontakt@maxbachmann.de>
Mon, 20 Mar 2023 15:47:17 +0000 (16:47 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Mar 2023 15:47:17 +0000 (15:47 +0000)
Since we pass a structure of type `OSVERSIONINFOEX`, we need to call
`GetVersionEx` instead of `GetVersionExW`.

Modules/socketmodule.c

index b7927750e334b77465fee6ebc584fbf17e133cb9..6a6f8cf7392e1cbb352bd14795438e93258c9567 100644 (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;
     }