mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.
This commit is contained in:
parent
1d59a0aacf
commit
5ab81d787f
25 changed files with 61 additions and 80 deletions
|
@ -5010,7 +5010,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
|
|||
assert(kwargs == NULL || PyDict_Check(kwargs));
|
||||
|
||||
if (co->co_kwonlyargcount == 0 &&
|
||||
(kwargs == NULL || PyDict_Size(kwargs) == 0) &&
|
||||
(kwargs == NULL || PyDict_GET_SIZE(kwargs) == 0) &&
|
||||
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE))
|
||||
{
|
||||
/* Fast paths */
|
||||
|
@ -5028,7 +5028,7 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
|
|||
|
||||
if (kwargs != NULL) {
|
||||
Py_ssize_t pos, i;
|
||||
nk = PyDict_Size(kwargs);
|
||||
nk = PyDict_GET_SIZE(kwargs);
|
||||
|
||||
kwtuple = PyTuple_New(2 * nk);
|
||||
if (kwtuple == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue