================ @@ -117,15 +148,22 @@ struct InitializePythonRAII { PyImport_AppendInittab("_lldb", LLDBSwigPyInit); } +#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8) || (PY_MAJOR_VERSION > 3) + config.install_signal_handlers = 0; + Py_InitializeFromConfig(&config); + PyConfig_Clear(&config); + InitializeThreadsPrivate(); +#else // Python < 3.2 and Python >= 3.2 reversed the ordering requirements for // calling `Py_Initialize` and `PyEval_InitThreads`. < 3.2 requires that you // call `PyEval_InitThreads` first, and >= 3.2 requires that you call it last. -#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 2) || (PY_MAJOR_VERSION > 3) +#if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 2) ---------------- DavidSpickett wrote:
Yes you're right I was struggling to read the nested ifdefs. This 3.2 code will be removed once the 20 branch happens so it's fine as is. https://github.com/llvm/llvm-project/pull/114112 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits