From 5f2a8cd9a685935726421fd28a42b61c303aef27 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 1 Aug 2025 07:57:34 -0700 Subject: [lldb] Replace Python APIs with their stable equivalent (#151618) --- lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 1340425..98c9b61 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) { -- cgit v1.1