From 9ce0a61bdbf13d4d0f2e13e1bb6e7a4bb9d01858 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 31 Oct 2024 08:46:35 -0700 Subject: [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 --- lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp') 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. -- cgit v1.2.3