Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.

This commit is contained in:
Serhiy Storchaka 2013-12-13 12:09:05 +02:00
parent 66c6e9dcb4
commit 17f22c9281
3 changed files with 4 additions and 7 deletions

View File

@ -161,10 +161,6 @@ class PollTests(unittest.TestCase):
pollster = select.poll() pollster = select.poll()
# Issue 15989 # 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.INT_MAX + 1)
self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1) self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1)

View File

@ -23,6 +23,8 @@ Core and Builtins
Library Library
------- -------
- Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
- Issue #17200: telnetlib's read_until and expect timeout was broken by the - Issue #17200: telnetlib's read_until and expect timeout was broken by the
fix to Issue #14635 in Python 2.7.4 to be interpreted as milliseconds fix to Issue #14635 in Python 2.7.4 to be interpreted as milliseconds
instead of seconds when the platform supports select.poll (ie: everywhere). instead of seconds when the platform supports select.poll (ie: everywhere).

View File

@ -366,11 +366,10 @@ static PyObject *
poll_register(pollObject *self, PyObject *args) poll_register(pollObject *self, PyObject *args)
{ {
PyObject *o, *key, *value; PyObject *o, *key, *value;
int fd; int fd, events = POLLIN | POLLPRI | POLLOUT;
short events = POLLIN | POLLPRI | POLLOUT;
int err; int err;
if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) { if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
return NULL; return NULL;
} }