[Lldb-commits] [lldb] [lldb] Use PY_VERSION_HEX to simplify conditional compilation (NFC) (PR #114346)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 31 05:52:22 PDT 2024
https://github.com/labath approved this pull request.
I wish python exposed the linux-style macro to construct an arbitrary version number (`#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))`) as figuring out what version does `0x030d0000` refer to is not completely trivial. Though I still think that's better than `(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 13) || (PY_MAJOR_VERSION > 3)`
If python starts going over 3.16, we may want to create our own macro like that.
The static assert is a nice touch.
https://github.com/llvm/llvm-project/pull/114346
More information about the lldb-commits
mailing list