commit | 5ab81d787f455ba28367b5b71606cea376283574 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Fri Dec 16 16:18:57 2016 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Dec 16 16:18:57 2016 +0200 |
tree | e78623a175940cb3d25d950812d0079021b178b7 | |
parent | 1d59a0aacf1ddd000b6c6e231cf82ddf74afe3b4 [diff] [blame] |
Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.
diff --git a/Objects/abstract.c b/Objects/abstract.c index 67b163d..8d1eddc 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c
@@ -2409,8 +2409,7 @@ assert(nargs >= 0); assert(kwargs == NULL || PyDict_CheckExact(kwargs)); - nkwargs = (kwargs != NULL) ? PyDict_Size(kwargs) : 0; - if (!nkwargs) { + if (kwargs == NULL || (nkwargs = PyDict_GET_SIZE(kwargs)) == 0) { *p_kwnames = NULL; return args; }