From e4671902bb3a81909914b5bb88c45faf9e46a2a2 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 3 Jun 2024 22:50:44 +0800 Subject: [PATCH] fix assert --- include/pybind11/internal/object.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pybind11/internal/object.h b/include/pybind11/internal/object.h index ab9b7f0a..80008292 100644 --- a/include/pybind11/internal/object.h +++ b/include/pybind11/internal/object.h @@ -50,7 +50,7 @@ namespace pybind11 { int reference_count() const { return ref_count == nullptr ? 0 : *ref_count; } const handle& inc_ref() const { - PK_DEBUG_ASSERT(m_ptr != nullptr); + assert(m_ptr != nullptr); if(ref_count == nullptr) { auto iter = _ref_counts_map->find(m_ptr); if(iter == _ref_counts_map->end()) { @@ -67,8 +67,8 @@ namespace pybind11 { } const handle& dec_ref() const { - PK_DEBUG_ASSERT(m_ptr != nullptr); - PK_DEBUG_ASSERT(ref_count != nullptr); + assert(m_ptr != nullptr); + assert(ref_count != nullptr); *ref_count -= 1; try {