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>2011-09-07 03:46:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-07 03:46:20 +0400
commit9161d3ce4bdd7c838751462b47eb045ea33a686e (patch)
tree8ce7ec347331f641b7fb53647b66a102235cd2bc /source/gameengine/Ketsji/KX_Scene.cpp
parent9baff83d72ccb287e2e6011c648877b96790e9a9 (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/Ketsji/KX_Scene.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 06e343cedb2..7c76ab01e93 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1916,7 +1916,7 @@ void KX_Scene::Render2DFilters(RAS_ICanvas* canvas)
void KX_Scene::RunDrawingCallbacks(PyObject* cb_list)
{
- int len;
+ Py_ssize_t len;
if (cb_list && (len=PyList_GET_SIZE(cb_list)))
{
@@ -1925,7 +1925,7 @@ void KX_Scene::RunDrawingCallbacks(PyObject* cb_list)
PyObject* ret;
// Iterate the list and run the callbacks
- for (int pos=0; pos < len; pos++)
+ for (Py_ssize_t pos=0; pos < len; pos++)
{
func= PyList_GET_ITEM(cb_list, pos);
ret= PyObject_Call(func, args, NULL);