diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-04-19 17:03:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-19 17:03:52 (GMT) |
commit | bf623ae8843dc30b28c574bec8d29fc14be59d86 (patch) | |
tree | 0a7ab5b441e0306767bfbc6da4522e4af34ab9e6 /Modules/selectmodule.c | |
parent | c209b70d610da50a844a3c10f37d6183bade3446 (diff) | |
download | cpython-bf623ae8843dc30b28c574bec8d29fc14be59d86.zip cpython-bf623ae8843dc30b28c574bec8d29fc14be59d86.tar.gz cpython-bf623ae8843dc30b28c574bec8d29fc14be59d86.tar.bz2 |
bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)
raised an error.
Replace them with using concrete types API that never fails if appropriate.
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 0b9b5da..d763bae 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -2021,8 +2021,8 @@ newKqueue_Object(PyTypeObject *type, SOCKET fd) static PyObject * kqueue_queue_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - if ((args != NULL && PyObject_Size(args)) || - (kwds != NULL && PyObject_Size(kwds))) { + if (PyTuple_GET_SIZE(args) || + (kwds != NULL && PyDict_GET_SIZE(kwds))) { PyErr_SetString(PyExc_ValueError, "select.kqueue doesn't accept arguments"); return NULL; |