Skip to content

Commit 5f2a8cd

Browse files
authored
[lldb] Replace Python APIs with their stable equivalent (#151618)
1 parent c5459a0 commit 5f2a8cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ bool PythonList::Check(PyObject *py_obj) {
539539

540540
uint32_t PythonList::GetSize() const {
541541
if (IsValid())
542-
return PyList_GET_SIZE(m_py_obj);
542+
return PyList_Size(m_py_obj);
543543
return 0;
544544
}
545545

@@ -618,7 +618,7 @@ bool PythonTuple::Check(PyObject *py_obj) {
618618

619619
uint32_t PythonTuple::GetSize() const {
620620
if (IsValid())
621-
return PyTuple_GET_SIZE(m_py_obj);
621+
return PyTuple_Size(m_py_obj);
622622
return 0;
623623
}
624624

@@ -899,7 +899,7 @@ bool PythonFile::Check(PyObject *py_obj) {
899899
const char *PythonException::toCString() const {
900900
if (!m_repr_bytes)
901901
return "unknown exception";
902-
return PyBytes_AS_STRING(m_repr_bytes);
902+
return PyBytes_AsString(m_repr_bytes);
903903
}
904904

905905
PythonException::PythonException(const char *caller) {

0 commit comments

Comments
 (0)