Skip to content

Commit f082098

Browse files
authored
gh-99191: Use correct check for MSVC C++ version support in _wmimodule.cpp (GH-100381)
1 parent 36f2329 commit f082098

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER >=1929``
2+
to more accurately test for C++20 support in :file:`PC/_wmimodule.cpp`.

PC/_wmimodule.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <Python.h>
1818

1919

20-
#if _MSC_VER >= 1929
20+
#if _MSVC_LANG >= 202002L
2121
// We can use clinic directly when the C++ compiler supports C++20
2222
#include "clinic/_wmimodule.cpp.h"
2323
#else
@@ -96,9 +96,9 @@ _query_thread(LPVOID param)
9696
}
9797
if (SUCCEEDED(hr)) {
9898
hr = services->ExecQuery(
99-
bstr_t("WQL"),
99+
bstr_t("WQL"),
100100
bstrQuery,
101-
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
101+
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
102102
NULL,
103103
&enumerator
104104
);

0 commit comments

Comments
 (0)