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

Skip to content

Commit 7b87f85

Browse files
committed
Add :method info to the PyArg_ParseTuple() format strings for poll objects.
1 parent e9719fe commit 7b87f85

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Modules/selectmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ poll_register(pollObject *self, PyObject *args)
362362
PyObject *o, *key, *value;
363363
int fd, events = POLLIN | POLLPRI | POLLOUT;
364364

365-
if (!PyArg_ParseTuple(args, "O|i", &o, &events)) {
365+
if (!PyArg_ParseTuple(args, "O|i:register", &o, &events)) {
366366
return NULL;
367367
}
368368

@@ -392,7 +392,7 @@ poll_unregister(pollObject *self, PyObject *args)
392392
PyObject *o, *key;
393393
int fd;
394394

395-
if (!PyArg_ParseTuple(args, "O", &o)) {
395+
if (!PyArg_ParseTuple(args, "O:unregister", &o)) {
396396
return NULL;
397397
}
398398

@@ -431,7 +431,7 @@ poll_poll(pollObject *self, PyObject *args)
431431
int timeout = 0, poll_result, i, j;
432432
PyObject *value = NULL, *num = NULL;
433433

434-
if (!PyArg_ParseTuple(args, "|O", &tout)) {
434+
if (!PyArg_ParseTuple(args, "|O:poll", &tout)) {
435435
return NULL;
436436
}
437437

0 commit comments

Comments
 (0)