use Py_ssize_t rather than int when dealing with list sizes (original patch from...
[blender.git] / source / gameengine / Expressions / Value.cpp
index e60b380e95cfc96732e11a804678324bc213450e..41c0850a779e2f4ffa0572a9345c5acae071c027 100644 (file)
@@ -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 */