xref: /src/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h (revision 5b27928474e6a4103d65b347544705c40c9618fd)
1706b4fc4SDimitry Andric //===-- PythonReadline.h ----------------------------------------*- C++ -*-===//
2706b4fc4SDimitry Andric //
3706b4fc4SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4706b4fc4SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5706b4fc4SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6706b4fc4SDimitry Andric //
7706b4fc4SDimitry Andric //===----------------------------------------------------------------------===//
8706b4fc4SDimitry Andric 
9706b4fc4SDimitry Andric #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
10706b4fc4SDimitry Andric #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
11706b4fc4SDimitry Andric 
12706b4fc4SDimitry Andric #include "lldb/Host/Config.h"
13706b4fc4SDimitry Andric 
14706b4fc4SDimitry Andric #if LLDB_ENABLE_LIBEDIT && defined(__linux__)
15706b4fc4SDimitry Andric // NOTE: Since Python may define some pre-processor definitions which affect the
16706b4fc4SDimitry Andric // standard headers on some systems, you must include Python.h before any
17706b4fc4SDimitry Andric // standard headers are included.
18706b4fc4SDimitry Andric #include "Python.h"
19706b4fc4SDimitry Andric 
20706b4fc4SDimitry Andric // no need to hack into Python's readline module if libedit isn't used.
21706b4fc4SDimitry Andric //
22706b4fc4SDimitry Andric #define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
23706b4fc4SDimitry Andric 
24706b4fc4SDimitry Andric PyMODINIT_FUNC initlldb_readline(void);
25706b4fc4SDimitry Andric 
26706b4fc4SDimitry Andric #endif
27706b4fc4SDimitry Andric 
28706b4fc4SDimitry Andric #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
29