xref: /freebsd-src/contrib/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h (revision c14a5a8800a0f7a007f8cd197b4cad4d26a78f8c)
1*c14a5a88SDimitry Andric //===-- PythonReadline.h ----------------------------------------*- C++ -*-===//
2*c14a5a88SDimitry Andric //
3*c14a5a88SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*c14a5a88SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*c14a5a88SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*c14a5a88SDimitry Andric //
7*c14a5a88SDimitry Andric //===----------------------------------------------------------------------===//
8*c14a5a88SDimitry Andric 
9*c14a5a88SDimitry Andric #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
10*c14a5a88SDimitry Andric #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
11*c14a5a88SDimitry Andric 
12*c14a5a88SDimitry Andric #if !defined(LLDB_DISABLE_LIBEDIT) && defined(__linux__)
13*c14a5a88SDimitry Andric // NOTE: Since Python may define some pre-processor definitions which affect the
14*c14a5a88SDimitry Andric // standard headers on some systems, you must include Python.h before any
15*c14a5a88SDimitry Andric // standard headers are included.
16*c14a5a88SDimitry Andric #include "Python.h"
17*c14a5a88SDimitry Andric 
18*c14a5a88SDimitry Andric // no need to hack into Python's readline module if libedit isn't used.
19*c14a5a88SDimitry Andric //
20*c14a5a88SDimitry Andric #define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
21*c14a5a88SDimitry Andric 
22*c14a5a88SDimitry Andric extern "C" PyMODINIT_FUNC initlldb_readline(void);
23*c14a5a88SDimitry Andric 
24*c14a5a88SDimitry Andric #endif
25*c14a5a88SDimitry Andric 
26*c14a5a88SDimitry Andric #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
27