Skip to content

Commit 53e29f4

Browse files
committed
Further small simplification. With the GIL held, simply deleting the raw_ptr takes care of everything.
1 parent f892cce commit 53e29f4

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

include/pybind11/pybind11.h

-1
Original file line numberDiff line numberDiff line change
@@ -2629,7 +2629,6 @@ inline void
26292629
error_already_set::m_fetched_error_deleter(detail::error_fetch_and_normalize *raw_ptr) {
26302630
gil_scoped_acquire gil;
26312631
error_scope scope;
2632-
raw_ptr->release_py_object_references();
26332632
delete raw_ptr;
26342633
}
26352634

include/pybind11/pytypes.h

-6
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,6 @@ struct error_fetch_and_normalize {
541541
return (PyErr_GivenExceptionMatches(m_type.ptr(), exc.ptr()) != 0);
542542
}
543543

544-
void release_py_object_references() {
545-
m_type.release().dec_ref();
546-
m_value.release().dec_ref();
547-
m_trace.release().dec_ref();
548-
}
549-
550544
// Not protecting these for simplicity.
551545
object m_type, m_value, m_trace;
552546

0 commit comments

Comments
 (0)