diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-12-22 11:50:44 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-12-22 11:50:44 +0000 |
| commit | c14a5a8800a0f7a007f8cd197b4cad4d26a78f8c (patch) | |
| tree | a1dde3bcaa50b579a1c761196c9bb100d2021707 /contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h | |
| parent | 3cf3b4e6419d14ed25c0b67b84763b3be937c8b5 (diff) | |
| parent | b96995b67f15110f39c41149543e19c8189abdaf (diff) | |
Notes
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h b/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h new file mode 100644 index 000000000000..faf95bb64486 --- /dev/null +++ b/contrib/llvm-project/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 |
