]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Dec 2013 10:08:01 +0000 (12:08 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Dec 2013 10:08:01 +0000 (12:08 +0200)
Lib/test/test_poll.py
Misc/NEWS
Modules/selectmodule.c

index f98a280e9a57b0139bed38e5862c18cdb7e3e04d..e51e6f0e9ea27af0dc4539e9f7214db7a0bc71a3 100644 (file)
@@ -161,10 +161,6 @@ class PollTests(unittest.TestCase):
 
         pollster = select.poll()
         # Issue 15989
-        self.assertRaises(OverflowError, pollster.register, 0,
-                          _testcapi.SHRT_MAX + 1)
-        self.assertRaises(OverflowError, pollster.register, 0,
-                          _testcapi.USHRT_MAX + 1)
         self.assertRaises(OverflowError, pollster.poll, _testcapi.INT_MAX + 1)
         self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1)
 
index 445a257b2184807eeb362335e8099d00a2da6712..cd14311aab9cf82857343e3aaa00d6cbf310637f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
+
 - Issue #19063: if a Charset's body_encoding was set to None, the email
   package would generate a message claiming the Content-Transfer-Encoding
   was 7bit, and produce garbage output for the content.  This now works.
index 603a2b670b083d763f9c1dfaf9ce50d37c268f9a..1bccc5fbaf8d5af2b2c54ad5cf933b7c10e49c0c 100644 (file)
@@ -380,11 +380,10 @@ static PyObject *
 poll_register(pollObject *self, PyObject *args)
 {
     PyObject *o, *key, *value;
-    int fd;
-    short events = POLLIN | POLLPRI | POLLOUT;
+    int fd, events = POLLIN | POLLPRI | POLLOUT;
     int err;
 
-    if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) {
+    if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
         return NULL;
     }