mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-20 06:49:25 +00:00
Adding .clang-tidy readability-braces-around-statements option.
clang-tidy automatic changes. NO manual changes.
This commit is contained in:
committed by
Ralf W. Grosse-Kunstleve
parent
8581584e60
commit
ddbc74c674
@@ -95,8 +95,9 @@ TEST_SUBMODULE(call_policies, m) {
|
||||
// but it's unclear how to test it without `PyGILState_GetThisThreadState`.
|
||||
auto report_gil_status = []() {
|
||||
auto is_gil_held = false;
|
||||
if (auto tstate = py::detail::get_thread_state_unchecked())
|
||||
if (auto tstate = py::detail::get_thread_state_unchecked()) {
|
||||
is_gil_held = (tstate == PyGILState_GetThisThreadState());
|
||||
}
|
||||
|
||||
return is_gil_held ? "GIL held" : "GIL released";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user