]> granicus.if.org Git - python/commitdiff
Don't use Py_SIZE for dict object. (#747)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 21 Mar 2017 06:52:38 +0000 (08:52 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Mar 2017 06:52:38 +0000 (08:52 +0200)
Objects/dictobject.c

index 1b1486a8bf73ef1534a92d6b2de92758aab37e81..aac7ac4467a026e565b2d74f1fed9208c004182e 100644 (file)
@@ -1915,7 +1915,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(PyDict_GET_SIZE(iterable)))) {
                 Py_DECREF(d);
                 return NULL;
             }