aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/pybind11/patches/no-assert-gil-held-incref-decref-for-python-2.patch
blob: d4384cb766cdca47c1e08c681e2ac4c61672ea5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- contrib/libs/pybind11/include/pybind11/detail/common.h	(index)
+++ contrib/libs/pybind11/include/pybind11/detail/common.h	(working tree)
@@ -321,6 +321,9 @@ PYBIND11_WARNING_POP
 #endif
 
 // See description of PR #4246:
+#if PY_MAJOR_VERSION < 3
+#    define PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF
+#endif
 #if !defined(PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF) && !defined(NDEBUG)                       \
     && !defined(PYPY_VERSION) && !defined(PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF)
 #    define PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF