From b96995b67f15110f39c41149543e19c8189abdaf Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 20 Dec 2019 21:55:13 +0000 Subject: Vendor import of llvm-project tag llvmorg-9.0.1: https://github.com/llvm/llvm-project/tree/llvmorg-9.0.1 --- .../ScriptInterpreter/Python/PythonReadline.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h new file mode 100644 index 0000000000000..faf95bb64486d --- /dev/null +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h @@ -0,0 +1,26 @@ +//===-- PythonReadline.h ----------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H +#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H + +#if !defined(LLDB_DISABLE_LIBEDIT) && defined(__linux__) +// NOTE: Since Python may define some pre-processor definitions which affect the +// standard headers on some systems, you must include Python.h before any +// standard headers are included. +#include "Python.h" + +// no need to hack into Python's readline module if libedit isn't used. +// +#define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1 + +extern "C" PyMODINIT_FUNC initlldb_readline(void); + +#endif + +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H -- cgit v1.2.3