[Lldb-commits] [lldb] 5f2a8cd - [lldb] Replace Python APIs with their stable equivalent (#151618)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 1 07:57:38 PDT 2025
Author: Jonas Devlieghere
Date: 2025-08-01T07:57:34-07:00
New Revision: 5f2a8cd9a685935726421fd28a42b61c303aef27
URL: https://github.com/llvm/llvm-project/commit/5f2a8cd9a685935726421fd28a42b61c303aef27
DIFF: https://github.com/llvm/llvm-project/commit/5f2a8cd9a685935726421fd28a42b61c303aef27.diff
LOG: [lldb] Replace Python APIs with their stable equivalent (#151618)
Added:
Modified:
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 1340425aade43..98c9b61c11980 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -539,7 +539,7 @@ bool PythonList::Check(PyObject *py_obj) {
uint32_t PythonList::GetSize() const {
if (IsValid())
- return PyList_GET_SIZE(m_py_obj);
+ return PyList_Size(m_py_obj);
return 0;
}
@@ -618,7 +618,7 @@ bool PythonTuple::Check(PyObject *py_obj) {
uint32_t PythonTuple::GetSize() const {
if (IsValid())
- return PyTuple_GET_SIZE(m_py_obj);
+ return PyTuple_Size(m_py_obj);
return 0;
}
@@ -899,7 +899,7 @@ bool PythonFile::Check(PyObject *py_obj) {
const char *PythonException::toCString() const {
if (!m_repr_bytes)
return "unknown exception";
- return PyBytes_AS_STRING(m_repr_bytes);
+ return PyBytes_AsString(m_repr_bytes);
}
PythonException::PythonException(const char *caller) {
More information about the lldb-commits
mailing list