Skip to content

Commit

Permalink
gh-99191: Use correct check for MSVC C++ version support in _wmimodul…
Browse files Browse the repository at this point in the history
…e.cpp (GH-100381)
  • Loading branch information
CAM-Gerlach committed Jan 9, 2023
1 parent 36f2329 commit f082098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER >=1929``
to more accurately test for C++20 support in :file:`PC/_wmimodule.cpp`.
6 changes: 3 additions & 3 deletions PC/_wmimodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <Python.h>


#if _MSC_VER >= 1929
#if _MSVC_LANG >= 202002L
// We can use clinic directly when the C++ compiler supports C++20
#include "clinic/_wmimodule.cpp.h"
#else
Expand Down Expand Up @@ -96,9 +96,9 @@ _query_thread(LPVOID param)
}
if (SUCCEEDED(hr)) {
hr = services->ExecQuery(
bstr_t("WQL"),
bstr_t("WQL"),
bstrQuery,
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
NULL,
&enumerator
);
Expand Down

0 comments on commit f082098

Please sign in to comment.