diff options
-rw-r--r-- | Objects/dictobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index d3c5eac..c10bfcc 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -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; |