bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750)

This commit is contained in:
Serhiy Storchaka 2017-03-22 07:45:23 +02:00 committed by GitHub
parent f93b994892
commit af839fe2fe

View file

@ -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;
}