xref: /llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h (revision 7ffe7d5ed73e917dffb34a3cbb60231338b95d28)
19357b5d0Sserge-sans-paille //===-- PythonReadline.h ----------------------------------------*- C++ -*-===//
29357b5d0Sserge-sans-paille //
39357b5d0Sserge-sans-paille // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
49357b5d0Sserge-sans-paille // See https://llvm.org/LICENSE.txt for license information.
59357b5d0Sserge-sans-paille // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
69357b5d0Sserge-sans-paille //
79357b5d0Sserge-sans-paille //===----------------------------------------------------------------------===//
89357b5d0Sserge-sans-paille 
99357b5d0Sserge-sans-paille #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
109357b5d0Sserge-sans-paille #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
119357b5d0Sserge-sans-paille 
12*7ffe7d5eSJonas Devlieghere #include "lldb/Host/Config.h"
13*7ffe7d5eSJonas Devlieghere 
1462456e57SJonas Devlieghere #if LLDB_ENABLE_LIBEDIT && defined(__linux__)
159357b5d0Sserge-sans-paille // NOTE: Since Python may define some pre-processor definitions which affect the
169357b5d0Sserge-sans-paille // standard headers on some systems, you must include Python.h before any
179357b5d0Sserge-sans-paille // standard headers are included.
189357b5d0Sserge-sans-paille #include "Python.h"
199357b5d0Sserge-sans-paille 
209357b5d0Sserge-sans-paille // no need to hack into Python's readline module if libedit isn't used.
219357b5d0Sserge-sans-paille //
229357b5d0Sserge-sans-paille #define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
239357b5d0Sserge-sans-paille 
24eb12b3b8SBenjamin Kramer PyMODINIT_FUNC initlldb_readline(void);
259357b5d0Sserge-sans-paille 
269357b5d0Sserge-sans-paille #endif
279357b5d0Sserge-sans-paille 
289357b5d0Sserge-sans-paille #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
29