From ad623a813e6d9ffdef62270656245b35ffceda37 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Mon, 4 Aug 2025 10:44:32 -0700 Subject: [lldb] Eliminate PyGILState_Check (NFC) (#152006) Eliminate calls to PyGILState_Check, which is not part of the Python Limited C API. In the Locker, we can use PyGILState_Ensure directly. We could do something similar to replace the assert, but I don't think it's worth it. We don't assert that we hold the GIL anywhere else. --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index b07415e..e124954 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -261,7 +261,6 @@ PythonObject PythonObject::GetAttributeValue(llvm::StringRef attr) const { } StructuredData::ObjectSP PythonObject::CreateStructuredObject() const { - assert(PyGILState_Check()); switch (GetObjectType()) { case PyObjectType::Dictionary: return PythonDictionary(PyRefType::Borrowed, m_py_obj) -- cgit v1.1