diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 16:18:57 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 16:18:57 +0200 |
| commit | 5ab81d787f455ba28367b5b71606cea376283574 (patch) | |
| tree | e78623a175940cb3d25d950812d0079021b178b7 /Objects/object.c | |
| parent | 1d59a0aacf1ddd000b6c6e231cf82ddf74afe3b4 (diff) | |
| download | cpython-git-5ab81d787f455ba28367b5b71606cea376283574.tar.gz | |
Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.
Diffstat (limited to 'Objects/object.c')
| -rw-r--r-- | Objects/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/object.c b/Objects/object.c index 9a7c7f7896..dc50131e3f 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1454,7 +1454,7 @@ none_dealloc(PyObject* ignore) static PyObject * none_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, "NoneType takes no arguments"); return NULL; } @@ -1573,7 +1573,7 @@ static PyMethodDef notimplemented_methods[] = { static PyObject * notimplemented_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, "NotImplementedType takes no arguments"); return NULL; } |
