aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 7dd8a74..2094f0b 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -239,19 +239,7 @@ public:
~PythonObject() { Reset(); }
- void Reset() {
- if (m_py_obj && Py_IsInitialized()) {
- if (_Py_IsFinalizing()) {
- // Leak m_py_obj rather than crashing the process.
- // https://docs.python.org/3/c-api/init.html#c.PyGILState_Ensure
- } else {
- PyGILState_STATE state = PyGILState_Ensure();
- Py_DECREF(m_py_obj);
- PyGILState_Release(state);
- }
- }
- m_py_obj = nullptr;
- }
+ void Reset();
void Dump() const {
if (m_py_obj)