diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2025-08-01 07:57:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-01 07:57:34 -0700 |
commit | 5f2a8cd9a685935726421fd28a42b61c303aef27 (patch) | |
tree | e104e48871373fecd5e4224b8e29a65a0a5149db /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | |
parent | c5459a0b57cbaacaca356a59148e2252d124b47b (diff) | |
download | llvm-5f2a8cd9a685935726421fd28a42b61c303aef27.zip llvm-5f2a8cd9a685935726421fd28a42b61c303aef27.tar.gz llvm-5f2a8cd9a685935726421fd28a42b61c303aef27.tar.bz2 |
[lldb] Replace Python APIs with their stable equivalent (#151618)
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |