diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-22 05:45:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-22 05:45:23 (GMT) |
commit | af839fe2fef12dbbc8083fc7f01daee48a85a916 (patch) | |
tree | a55123ec88b815b71bd66119cedd3f137fdcbd73 /Objects | |
parent | f93b9948920018eb30ac678647c75d5e8e5ca458 (diff) | |
download | cpython-af839fe2fef12dbbc8083fc7f01daee48a85a916.zip cpython-af839fe2fef12dbbc8083fc7f01daee48a85a916.tar.gz cpython-af839fe2fef12dbbc8083fc7f01daee48a85a916.tar.bz2 |
bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750)
Diffstat (limited to 'Objects')
-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 a0c1977..8bcc931 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -1929,7 +1929,7 @@ _PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value) PyObject *key; Py_hash_t hash; - if (dictresize(mp, ESTIMATE_SIZE(Py_SIZE(iterable)))) { + if (dictresize(mp, ESTIMATE_SIZE(((PyDictObject *)iterable)->ma_used))) { Py_DECREF(d); return NULL; } |