[Python-checkins] cpython: Close #14223: curses.addch() is no more limited to the range 0-255 when the
victor.stinner
python-checkins at python.org
Thu Mar 8 02:08:47 CET 2012
http://hg.python.org/cpython/rev/861a5f3e7453
changeset: 75485:861a5f3e7453
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Mar 08 02:08:48 2012 +0100
summary:
Close #14223: curses.addch() is no more limited to the range 0-255 when the
Python curses is not linked to libncursesw. It was a regression introduced in
Python 3.3a1.
files:
Misc/NEWS | 4 ++++
Modules/_cursesmodule.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,10 @@
Library
-------
+- Issue #14223: curses.addch() is no more limited to the range 0-255 when the
+ Python curses is not linked to libncursesw. It was a regression introduced
+ in Python 3.3a1.
+
- Issue #14168: Check for presence of Element._attrs in minidom before
accessing it.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -340,7 +340,7 @@
#endif
{
*ch = (chtype)value;
- if ((long)*ch != value || value < 0 || value > 255) {
+ if ((long)*ch != value) {
PyErr_Format(PyExc_OverflowError,
"byte doesn't fit in chtype");
return 0;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list