Commit b2c4ff60 by Wenzel Jakob

renamed local gil_scoped_acquire to gil_scoped_acquire_local to avoid ambiguity

parent b60fd233
...@@ -173,9 +173,9 @@ PYBIND11_NOINLINE inline internals &get_internals() { ...@@ -173,9 +173,9 @@ PYBIND11_NOINLINE inline internals &get_internals() {
// Ensure that the GIL is held since we will need to make Python calls. // 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. // Cannot use py::gil_scoped_acquire here since that constructor calls get_internals.
struct gil_scoped_acquire { struct gil_scoped_acquire_local {
gil_scoped_acquire() : state (PyGILState_Ensure()) {} gil_scoped_acquire_local() : state (PyGILState_Ensure()) {}
~gil_scoped_acquire() { PyGILState_Release(state); } ~gil_scoped_acquire_local() { PyGILState_Release(state); }
const PyGILState_STATE state; const PyGILState_STATE state;
} gil; } gil;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment