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>2012-11-21 06:28:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-21 06:28:36 +0400
commit3fd388fb06e474a4e9e2f6816eb0a0b95ab433e7 (patch)
tree214a3ade3c842bc301aa6bedf7f3f826c873b2a6 /source/blender/python/intern/bpy_rna_array.c
parent387bb73e4343be164f167565cefebbee613cdb7b (diff)
py api cleanup, replace use...
- PyLong_FromSsize_t --> PyLong_FromLong - PyLong_AsSsize_t --> PyLong_AsLong In all places except for those where python api expects PySsize_t (index lookups mainly). - use PyBool_FromLong in a few areas of the BGE. - fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
Diffstat (limited to 'source/blender/python/intern/bpy_rna_array.c')
-rw-r--r--source/blender/python/intern/bpy_rna_array.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c
index e66d8f05309..62c0ced9eab 100644
--- a/source/blender/python/intern/bpy_rna_array.c
+++ b/source/blender/python/intern/bpy_rna_array.c
@@ -507,7 +507,7 @@ static void py_to_float(PyObject *py, char *data)
static void py_to_int(PyObject *py, char *data)
{
- *(int *)data = (int)PyLong_AsSsize_t(py);
+ *(int *)data = (int)PyLong_AsLong(py);
}
static void py_to_bool(PyObject *py, char *data)
@@ -609,7 +609,7 @@ PyObject *pyrna_array_index(PointerRNA *ptr, PropertyRNA *prop, int index)
item = PyBool_FromLong(RNA_property_boolean_get_index(ptr, prop, index));
break;
case PROP_INT:
- item = PyLong_FromSsize_t(RNA_property_int_get_index(ptr, prop, index));
+ item = PyLong_FromLong(RNA_property_int_get_index(ptr, prop, index));
break;
default:
PyErr_SetString(PyExc_TypeError, "not an array type");
@@ -766,7 +766,7 @@ int pyrna_array_contains_py(PointerRNA *ptr, PropertyRNA *prop, PyObject *value)
case PROP_BOOLEAN:
case PROP_INT:
{
- int value_i = PyLong_AsSsize_t(value);
+ int value_i = PyLong_AsLong(value);
if (value_i == -1 && PyErr_Occurred()) {
PyErr_Clear();
return 0;