File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ jobs:
103103 - uses : actions/download-artifact@v4
104104
105105 - name : Generate artifact attestation for sdist and wheel
106- uses : actions/attest-build-provenance@bdd51370e0416ac948727f861e03c2f05d32d78e # v1.3.2
106+ uses : actions/attest-build-provenance@5e9cb68e95676991667494a6a4e59b8a2f13e1d0 # v1.3.3
107107 with :
108108 subject-path : " */pybind11*"
109109
Original file line number Diff line number Diff line change 88#include < cassert>
99#include < mutex>
1010
11+ #ifdef Py_GIL_DISABLED
12+ # include < atomic>
13+ #endif
14+
1115PYBIND11_NAMESPACE_BEGIN (PYBIND11_NAMESPACE)
1216
1317// Use the `gil_safe_call_once_and_store` class below instead of the naive
@@ -82,7 +86,12 @@ class gil_safe_call_once_and_store {
8286private:
8387 alignas (T) char storage_[sizeof (T)] = {};
8488 std::once_flag once_flag_ = {};
85- bool is_initialized_ = false ;
89+ #ifdef Py_GIL_DISABLED
90+ std::atomic_bool
91+ #else
92+ bool
93+ #endif
94+ is_initialized_{false };
8695 // The `is_initialized_`-`storage_` pair is very similar to `std::optional`,
8796 // but the latter does not have the triviality properties of former,
8897 // therefore `std::optional` is not a viable alternative here.
You can’t perform that action at this time.
0 commit comments