use Py_ssize_t rather than int when dealing with list sizes (original patch from...
[blender.git] / source / gameengine / Expressions / ListValue.cpp
index 271d5067dd9733352db35173e43d2797013b1dfa..934f2a8dd8794b6e26117e4c179790a490cab7df 100644 (file)
@@ -387,7 +387,7 @@ PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihig
 static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other)
 {
        CListValue *listval= static_cast<CListValue *>(BGE_PROXY_REF(self));
-       int i, numitems, numitems_orig;
+       Py_ssize_t i, numitems, numitems_orig;
        
        if (listval==NULL) {
                PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
@@ -408,7 +408,7 @@ static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other)
                CValue* listitemval;
                bool error = false;
                
-               numitems = PyList_Size(other);
+               numitems = PyList_GET_SIZE(other);
                
                /* copy the first part of the list */
                listval_new->Resize(numitems_orig + numitems);