Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb1c4c8

Browse files
Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
2 parents 2748bc7 + 3ad2d70 commit cb1c4c8

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

Lib/test/test_poll.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ def test_poll3(self):
163163

164164
pollster = select.poll()
165165
# Issue 15989
166-
self.assertRaises(OverflowError, pollster.register, 0,
167-
_testcapi.SHRT_MAX + 1)
168-
self.assertRaises(OverflowError, pollster.register, 0,
169-
_testcapi.USHRT_MAX + 1)
170166
self.assertRaises(OverflowError, pollster.poll, _testcapi.INT_MAX + 1)
171167
self.assertRaises(OverflowError, pollster.poll, _testcapi.UINT_MAX + 1)
172168

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Core and Builtins
3737
Library
3838
-------
3939

40+
- Issue #17919: select.poll.poll() again works with poll.POLLNVAL on AIX.
41+
4042
- Issue #19063: if a Charset's body_encoding was set to None, the email
4143
package would generate a message claiming the Content-Transfer-Encoding
4244
was 7bit, and produce garbage output for the content. This now works.

Modules/selectmodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,10 @@ static PyObject *
375375
poll_register(pollObject *self, PyObject *args)
376376
{
377377
PyObject *o, *key, *value;
378-
int fd;
379-
short events = POLLIN | POLLPRI | POLLOUT;
378+
int fd, events = POLLIN | POLLPRI | POLLOUT;
380379
int err;
381380

382-
if (!PyArg_ParseTuple(args, "O|h:register", &o, &events)) {
381+
if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
383382
return NULL;
384383
}
385384

0 commit comments

Comments
 (0)