summaryrefslogtreecommitdiff
path: root/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2024-10-31 08:46:35 -0700
committerGitHub <noreply@github.com>2024-10-31 08:46:35 -0700
commit9ce0a61bdbf13d4d0f2e13e1bb6e7a4bb9d01858 (patch)
tree0348189ac2d8593b317649d3d42bba38a3f97dd4 /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
parent9234ae1bbeddd66d8bed3c55c26f8eee0c827aed (diff)
[lldb] Use PY_VERSION_HEX to simplify conditional compilation (NFC) (#114346)
Use PY_VERSION_HEX to simplify conditional compilation depending on the Python version. This also adds a static_assert to lldb-python to error out with a meaningful diagnostic when you try building LLDB with an older Python version in preparation for [1]. [1] https://discourse.llvm.org/t/rfc-lets-document-and-enforce-a-minimum-python-version-for-lldb/82731/15
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
-rw-r--r--lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index b90fbb783099..365ebc8e52c2 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -760,7 +760,7 @@ class NewStyle(object):
EXPECT_EQ(arginfo.get().max_positional_args, 3u);
}
-#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+#if PY_VERSION_HEX >= 0x03030000
// the old implementation of GetArgInfo just doesn't work on builtins.