diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-07 03:46:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-07 03:46:20 +0400 |
commit | 9161d3ce4bdd7c838751462b47eb045ea33a686e (patch) | |
tree | 8ce7ec347331f641b7fb53647b66a102235cd2bc /source/gameengine/Expressions/Value.cpp | |
parent | 9baff83d72ccb287e2e6011c648877b96790e9a9 (diff) |
use Py_ssize_t rather than int when dealing with list sizes (original patch from Fedora but applied changes elsewhere too), also replace PyList_Size with PyList_GET_SIZE where typechecking is already done.
Diffstat (limited to 'source/gameengine/Expressions/Value.cpp')
-rw-r--r-- | source/gameengine/Expressions/Value.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index e60b380e95c..41c0850a779 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -546,8 +546,8 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix) CListValue* listval = new CListValue(); bool error = false; - int i; - int numitems = PyList_Size(pyobj); + Py_ssize_t i; + Py_ssize_t numitems = PyList_GET_SIZE(pyobj); for (i=0;i<numitems;i++) { PyObject* listitem = PyList_GetItem(pyobj,i); /* borrowed ref */ |