summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/modules/readline/readline.cpp
blob: e5941cc50fd988b5d12104c8ba3ba2dcf9acf136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include "Python.h"

// Python readline module intentionally built to not implement the
// readline module interface. This is meant to work around llvm
// pr18841 to avoid seg faults in the stock Python readline.so linked
// against GNU readline.

static struct PyMethodDef moduleMethods[] =
{
    {0, 0}
};

PyDoc_STRVAR(
    moduleDocumentation,
    "Stub module meant to effectively disable readline support.");

PyMODINIT_FUNC
initreadline(void)
{
    Py_InitModule4(
        "readline",
        moduleMethods,
        moduleDocumentation,
        static_cast<PyObject *>(NULL),
        PYTHON_API_VERSION);
}
OpenPOWER on IntegriCloud