PyAPI: minor optimization for dictionary creation

Pass size when its known.
This commit is contained in:
2016-07-31 17:22:04 +10:00
parent e97ab8347a
commit a96c9def6f
6 changed files with 10 additions and 10 deletions

View File

@@ -688,7 +688,7 @@ static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
}
case IDP_GROUP:
{
PyObject *dict = PyDict_New();
PyObject *dict = _PyDict_NewPresized(prop->len);
IDProperty *loop;
for (loop = prop->data.group.first; loop; loop = loop->next) {