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/blender/python/generic/bpy_internal_import.c | |
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/blender/python/generic/bpy_internal_import.c')
-rw-r--r-- | source/blender/python/generic/bpy_internal_import.c | 4 |
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); |