aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-08-05 16:19:59 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2025-08-05 16:21:22 -0700
commit4c2d56318fec16d1d5241cd91d38b59cb65bce83 (patch)
tree056c54c252c6c0ccae55cbb0f1b00cc781e424a1 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent600976f4bfb06526c283dcc4efc4801792f08ca5 (diff)
downloadllvm-4c2d56318fec16d1d5241cd91d38b59cb65bce83.zip
llvm-4c2d56318fec16d1d5241cd91d38b59cb65bce83.tar.gz
llvm-4c2d56318fec16d1d5241cd91d38b59cb65bce83.tar.bz2
[lldb] Drop PY_MINOR_VERSION >= 3 check (NFC)
The minimum supported Python version is now 3.8, so there's no supported configuration where the minor version is less than 3.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 4a45673..82aa022 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -430,13 +430,8 @@ Expected<llvm::StringRef> PythonString::AsUTF8() const {
}
size_t PythonString::GetSize() const {
- if (IsValid()) {
-#if PY_MINOR_VERSION >= 3
+ if (IsValid())
return PyUnicode_GetLength(m_py_obj);
-#else
- return PyUnicode_GetSize(m_py_obj);
-#endif
- }
return 0;
}