mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
avoid a function call with redundant checks for dict size
This commit is contained in:
parent
37d2c99b22
commit
9892f52145
1 changed files with 1 additions and 1 deletions
|
|
@ -1335,7 +1335,7 @@ dict_fromkeys(PyObject *cls, PyObject *args)
|
|||
if (d == NULL)
|
||||
return NULL;
|
||||
|
||||
if (PyDict_CheckExact(d) && PyDict_Size(d) == 0) {
|
||||
if (PyDict_CheckExact(d) && ((PyDictObject *)d)->ma_used == 0) {
|
||||
if (PyDict_CheckExact(seq)) {
|
||||
PyDictObject *mp = (PyDictObject *)d;
|
||||
PyObject *oldvalue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue