teak-llvm/lldb/scripts/Python/modules/readline/readline.cpp
Todd Fiala 34413ec640 Fix an incomplete null structure spec in Python readline suppression module.
Now that I'm building Linux with clang, I'm seeing more clang warnings.
This fills in some extra fields missing in the final end-of-structure-array
marker.

llvm-svn: 211812
2014-06-26 22:35:36 +00:00

28 lines
657 B
C++

#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[] =
{
{nullptr, nullptr, 0, nullptr}
};
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);
}