From af839fe2fef12dbbc8083fc7f01daee48a85a916 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 22 Mar 2017 07:45:23 +0200 Subject: [PATCH] bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750) --- Objects/dictobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/dictobject.c b/Objects/dictobject.c index a0c1977037..8bcc931148 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; } -- 2.40.0