[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.
This commit is contained in:
1 parent
9d151897ba
commit
ad623a813e
2 files changed
+3
-3
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user