avoid a function call with redundant checks for dict size
This commit is contained in:
parent
c40ddae84c
commit
47fa4d54e8
|
@ -1353,7 +1353,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…
Reference in New Issue