aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-01-31 17:59:10 +0300
committerAlexander Smirnov <alex@ydb.tech>2024-02-09 19:16:40 +0300
commitc88ff01faaf3dbc93564a15e930bb533a56516d1 (patch)
tree6172c63a181460fbcd40a7fbea97f3ed8f41bd39 /contrib/libs
parent22faf7825187091e0ac85a196aab658c151f83be (diff)
downloadydb-c88ff01faaf3dbc93564a15e930bb533a56516d1.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/libs')
-rw-r--r--contrib/libs/pybind11/include/pybind11/pytypes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/libs/pybind11/include/pybind11/pytypes.h b/contrib/libs/pybind11/include/pybind11/pytypes.h
index fcad4c609e..6c255c6cde 100644
--- a/contrib/libs/pybind11/include/pybind11/pytypes.h
+++ b/contrib/libs/pybind11/include/pybind11/pytypes.h
@@ -265,6 +265,11 @@ public:
this function automatically. Returns a reference to itself.
\endrst */
const handle &dec_ref() const & {
+#ifdef Py_DEBUG
+ if (!Py_IsInitialized()) {
+ return *this;
+ }
+#endif
#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
if (m_ptr != nullptr && !PyGILState_Check()) {
throw_gilstate_error("pybind11::handle::dec_ref()");