Skip to content

Commit e248d94

Browse files
committed
fix: support Python < 3.6
1 parent 9057962 commit e248d94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/pybind11/gil.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ class gil_scoped_release {
149149
if (active)
150150
PyEval_RestoreThread(tstate);
151151
if (disassoc) {
152-
auto *key = detail::get_internals().tstate;
152+
// Python >= 3.7 can remove this, it's an int before 3.7
153+
// NOLINTNEXTLINE(readability-qualified-auto)
154+
auto key = detail::get_internals().tstate;
153155
PYBIND11_TLS_REPLACE_VALUE(key, tstate);
154156
}
155157
}

0 commit comments

Comments
 (0)