From: Serhiy Storchaka Date: Fri, 13 Dec 2013 10:08:01 +0000 (+0200) Subject: Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX. X-Git-Tag: v3.4.0b2~237^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ad2d70947a1b6c4b76c2029213e654c1b6ebc4e;p=thirdparty%2FPython%2Fcpython.git Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX. --- diff --git a/Lib/test/test_poll.py b/Lib/test/test_poll.py index f98a280e9a57..e51e6f0e9ea2 100644 --- a/Lib/test/test_poll.py +++ b/Lib/test/test_poll.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 445a257b2184..cd14311aab9c 100644 --- 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. diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 603a2b670b08..1bccc5fbaf8d 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -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; }