mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 22:52:01 +00:00
renamed local gil_scoped_acquire to gil_scoped_acquire_local to avoid ambiguity
This commit is contained in:
parent
b60fd233fa
commit
b2c4ff6052
@ -173,9 +173,9 @@ PYBIND11_NOINLINE inline internals &get_internals() {
|
||||
|
||||
// Ensure that the GIL is held since we will need to make Python calls.
|
||||
// Cannot use py::gil_scoped_acquire here since that constructor calls get_internals.
|
||||
struct gil_scoped_acquire {
|
||||
gil_scoped_acquire() : state (PyGILState_Ensure()) {}
|
||||
~gil_scoped_acquire() { PyGILState_Release(state); }
|
||||
struct gil_scoped_acquire_local {
|
||||
gil_scoped_acquire_local() : state (PyGILState_Ensure()) {}
|
||||
~gil_scoped_acquire_local() { PyGILState_Release(state); }
|
||||
const PyGILState_STATE state;
|
||||
} gil;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user