SIGN IN SIGN UP

gh-92135: Fix _Py_reinterpret_cast() for const (#92138)

Fix C++ compiler warnings on cast macros, like _PyObject_CAST(), when
casting a constant expression to a non constant type: use
const_cast<> in C++.

* In C++, Py_SAFE_DOWNCAST() now uses static_cast<> rather than
  reinterpret_cast<>.
* Add tests to the _testcppext C++ extension.
* test_cppext no longer captures stdout in verbose mode.
V
Victor Stinner committed
031397063e9c22711abfbf90f2617c8785cfc42c
Parent: b11243e
Committed by GitHub <noreply@github.com> on 5/2/2022, 3:07:00 PM