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/blender/python/generic
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/blender/python/generic')
-rw-r--r--source/blender/python/generic/bpy_internal_import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index f0158fe72c3..67ed90c79eb 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -344,7 +344,7 @@ void bpy_text_clear_modules(int clear_all)
/* looping over the dict */
PyObject *key, *value;
- int pos= 0;
+ Py_ssize_t pos= 0;
/* new list */
PyObject *list;
@@ -374,7 +374,7 @@ void bpy_text_clear_modules(int clear_all)
}
/* remove all our modules */
- for(pos=0; pos < PyList_Size(list); pos++) {
+ for(pos=0; pos < PyList_GET_SIZE(list); pos++) {
/* PyObject_Print(key, stderr, 0); */
key= PyList_GET_ITEM(list, pos);
PyDict_DelItem(modules, key);