diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-01-04 13:20:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-01-04 13:23:26 +0300 |
commit | b240b8e23115fe99f47ee5b3fd66fd3796ff8a1b (patch) | |
tree | 21b3fe18c223d3453ac12ff1de5aa0083e3e8458 /source/gameengine/Expressions/Value.cpp | |
parent | de6b546e15523a0a4ab6da7e5beebaeb15cfa617 (diff) |
Freestyle: reserve array sizes before filling
also use PyList_GET_ITEM when list size is known.
Diffstat (limited to 'source/gameengine/Expressions/Value.cpp')
-rw-r--r-- | source/gameengine/Expressions/Value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index bdef2dbd5b0..286db016476 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -568,7 +568,7 @@ CValue *CValue::ConvertPythonToValue(PyObject *pyobj, const bool do_type_excepti Py_ssize_t numitems = PyList_GET_SIZE(pyobj); for (i=0;i<numitems;i++) { - PyObject *listitem = PyList_GetItem(pyobj,i); /* borrowed ref */ + PyObject *listitem = PyList_GET_ITEM(pyobj,i); /* borrowed ref */ CValue* listitemval = ConvertPythonToValue(listitem, error_prefix); if (listitemval) { |