]> granicus.if.org Git - python/commitdiff
Close #14223: curses.addch() is no more limited to the range 0-255 when the
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 8 Mar 2012 01:08:48 +0000 (02:08 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 8 Mar 2012 01:08:48 +0000 (02:08 +0100)
Python curses is not linked to libncursesw. It was a regression introduced in
Python 3.3a1.

Misc/NEWS
Modules/_cursesmodule.c

index 451b803b671d8e941cea1d573785612d28f7e01e..91acc455f18050f677f646edd0b7714c8d8a58d4 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -22,6 +22,10 @@ Core and Builtins
 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.
 
index 64178d7aefa24490462dec941bc495e1870e4a17..40b6e68aae439fadedcb59262177e421c361b108 100644 (file)
@@ -340,7 +340,7 @@ PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj,
 #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;