blob: b0d6b7486053f739274c223b9e7925697c61fd48 [file] [log] [blame]
Todd Fiala9bb71b72014-02-26 07:39:20 +00001#include <stdio.h>
2#include "Python.h"
3
4// Python readline module intentionally built to not implement the
5// readline module interface. This is meant to work around llvm
6// pr18841 to avoid seg faults in the stock Python readline.so linked
7// against GNU readline.
8
9static struct PyMethodDef moduleMethods[] =
10{
Todd Fiala34413ec2014-06-26 22:35:36 +000011 {nullptr, nullptr, 0, nullptr}
Todd Fiala9bb71b72014-02-26 07:39:20 +000012};
13
14PyDoc_STRVAR(
15 moduleDocumentation,
16 "Stub module meant to effectively disable readline support.");
17
18PyMODINIT_FUNC
19initreadline(void)
20{
21 Py_InitModule4(
22 "readline",
23 moduleMethods,
24 moduleDocumentation,
25 static_cast<PyObject *>(NULL),
26 PYTHON_API_VERSION);
27}