Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.

This commit is contained in:
Serhiy Storchaka 2016-12-16 16:18:57 +02:00
parent 1d59a0aacf
commit 5ab81d787f
25 changed files with 61 additions and 80 deletions

View file

@ -19,7 +19,7 @@ this type and there is exactly one in existence.
static PyObject *
ellipsis_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
if (PyTuple_GET_SIZE(args) || (kwargs && PyDict_Size(kwargs))) {
if (PyTuple_GET_SIZE(args) || (kwargs && PyDict_GET_SIZE(kwargs))) {
PyErr_SetString(PyExc_TypeError, "EllipsisType takes no arguments");
return NULL;
}