summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-26 14:03:47 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-26 14:03:47 (GMT)
commit29604a1b4c09ae6efc47fa0f34412168a34aa7dd (patch)
treec05c39c0e4e1339c485fb3bce5266dec7b2f31d5 /Modules/_cursesmodule.c
parent2a7d991c6c16145d657e4858a4ef3b9147b183a0 (diff)
downloadcpython-29604a1b4c09ae6efc47fa0f34412168a34aa7dd.zip
cpython-29604a1b4c09ae6efc47fa0f34412168a34aa7dd.tar.gz
cpython-29604a1b4c09ae6efc47fa0f34412168a34aa7dd.tar.bz2
#1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 246e871..137c580 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1677,11 +1677,20 @@ NoArgTrueFalseFunction(has_colors)
NoArgTrueFalseFunction(has_ic)
NoArgTrueFalseFunction(has_il)
NoArgTrueFalseFunction(isendwin)
-NoArgNoReturnVoidFunction(filter)
NoArgNoReturnVoidFunction(flushinp)
NoArgNoReturnVoidFunction(noqiflush)
static PyObject *
+PyCurses_filter(PyObject *self)
+{
+ /* not checking for PyCursesInitialised here since filter() must
+ be called before initscr() */
+ filter();
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
PyCurses_Color_Content(PyObject *self, PyObject *args)
{
short color,r,g,b;