Mercurial > cpython-lru_cache-weakref
diff Modules/_cursesmodule.c @ 44975:a750a26b5fad 2.5
#1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
(backport from rev. 60322)
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sat, 26 Jan 2008 14:03:51 +0000 |
| parents | 76c765a74fb8 |
| children | 787b969d37f0 |
line wrap: on
line diff
--- a/Modules/_cursesmodule.c Fri Jan 25 21:08:41 2008 +0000 +++ b/Modules/_cursesmodule.c Sat Jan 26 14:03:51 2008 +0000 @@ -1619,11 +1619,20 @@ 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;
