#1940: make it possible to use curses.filter() before curses.initscr()

as the documentation says.
 (backport from rev. 60322)
This commit is contained in:
Georg Brandl 2008-01-26 14:03:51 +00:00
parent 6bf585e753
commit ee50e3c734
2 changed files with 13 additions and 1 deletions

View File

@ -212,6 +212,9 @@ Library
Extension Modules
-----------------
- #1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
- Fix a potential 'SystemError: NULL result without error' in _ctypes.
- Prevent a segfault when a ctypes NULL function pointer is called.

View File

@ -1619,10 +1619,19 @@ 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)
{