Skip to content

Commit 75cc8bd

Browse files
committed
Enabling PyGILState_Check() for Python >= 3.6 only.
Possibly, this explains why PyGILState_Check() cannot safely be used with Python 3.4 and 3.5: python/cpython#10267 (comment)
1 parent 64e47cd commit 75cc8bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/pybind11/cast.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ unpacking_collector<policy> collect_arguments(Args &&...args) {
13481348
template <typename Derived>
13491349
template <return_value_policy policy, typename... Args>
13501350
object object_api<Derived>::operator()(Args &&...args) const {
1351-
#if PY_VERSION_HEX >= 0x03040000
1351+
#if PY_VERSION_HEX >= 0x03060000
13521352
if (!PyGILState_Check()) {
13531353
pybind11_fail("pybind11::object_api<>::operator() PyGILState_Check() failure.");
13541354
}

0 commit comments

Comments
 (0)