Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-07-31 10:22:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-31 10:22:04 +0300
commita96c9def6f57269f6ff10a189cd55ff43dc3a15f (patch)
tree39e868feff4d58deadf062627d2ece40c8bc25db /source/blender/python/generic/idprop_py_api.c
parente97ab8347a16f84bdddeaf53305cd9a7f42860ab (diff)
PyAPI: minor optimization for dictionary creation
Pass size when its known.
Diffstat (limited to 'source/blender/python/generic/idprop_py_api.c')
-rw-r--r--source/blender/python/generic/idprop_py_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index 2f8afdf1ed1..2e15b7b1413 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -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) {