[Python-checkins] r60322 - in python/trunk: Misc/NEWS Modules/_cursesmodule.c

georg.brandl python-checkins at python.org
Sat Jan 26 15:03:47 CET 2008


Author: georg.brandl
Date: Sat Jan 26 15:03:47 2008
New Revision: 60322
Modified:
 python/trunk/Misc/NEWS
 python/trunk/Modules/_cursesmodule.c
Log:
#1940: make it possible to use curses.filter() before curses.initscr()
as the documentation says.
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sat Jan 26 15:03:47 2008
@@ -1103,9 +1103,13 @@
 does not claim to support starttls. Adds the SMTP.ehlo_or_helo_if_needed()
 method. Patch contributed by Bill Fenner.
 
+
 Extension Modules
 -----------------
 
+- #1940: make it possible to use curses.filter() before curses.initscr()
+ as the documentation says.
+
 - Backport of _fileio module from Python 3.0.
 
 - #1087741: mmap.mmap is now a class, not a factory function. It is also
Modified: python/trunk/Modules/_cursesmodule.c
==============================================================================
--- python/trunk/Modules/_cursesmodule.c	(original)
+++ python/trunk/Modules/_cursesmodule.c	Sat Jan 26 15:03:47 2008
@@ -1677,11 +1677,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;


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /