We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9057962 commit 63f0695Copy full SHA for 63f0695
include/pybind11/gil.h
@@ -130,7 +130,9 @@ class gil_scoped_release {
130
auto &internals = detail::get_internals();
131
tstate = PyEval_SaveThread();
132
if (disassoc) {
133
- auto *key = internals.tstate;
+ // Python >= 3.7 can remove this, it's an int before 3.7
134
+ // NOLINTNEXTLINE(readability-qualified-auto)
135
+ auto key = internals.tstate;
136
PYBIND11_TLS_DELETE_VALUE(key);
137
}
138
@@ -149,7 +151,9 @@ class gil_scoped_release {
149
151
if (active)
150
152
PyEval_RestoreThread(tstate);
153
- auto *key = detail::get_internals().tstate;
154
155
156
+ auto key = detail::get_internals().tstate;
157
PYBIND11_TLS_REPLACE_VALUE(key, tstate);
158
159
0 commit comments