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>2009-03-29 08:34:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-03-29 08:34:20 +0400
commitb450313b8da2b9844a83f2006ebb50d328c367e9 (patch)
tree87e26739de384b9dcc0e45000885334a15650d25 /source/blender/python/intern
parent931527e648acfbc2c7b71b59ce661dad9a4c1038 (diff)
- python api was returning incorrect int values from rna because it was using PyLong_FromSize_t rather than PyLong_FromSsize_t, this messed up the default values in documentation.
- renamed POSE_OT_select_hierarchy "add_to_sel" property to "extend" - some property names were wrong (giving errors in the console at startup)
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_compat.h2
-rw-r--r--source/blender/python/intern/bpy_rna.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_compat.h b/source/blender/python/intern/bpy_compat.h
index 0fbb4aede7d..4f64c916ca2 100644
--- a/source/blender/python/intern/bpy_compat.h
+++ b/source/blender/python/intern/bpy_compat.h
@@ -37,7 +37,7 @@
#undef PyUnicode_Check
#define PyUnicode_Check PyString_Check
-#define PyLong_FromSize_t PyInt_FromLong
+#define PyLong_FromSsize_t PyInt_FromLong
#define PyLong_AsSsize_t PyInt_AsLong
#undef PyLong_Check
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index d847cc445e6..23eed552a2a 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -161,7 +161,7 @@ PyObject * pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
ret = PyBool_FromLong( RNA_property_boolean_get(ptr, prop) );
break;
case PROP_INT:
- ret = PyLong_FromSize_t( (size_t)RNA_property_int_get(ptr, prop) );
+ ret = PyLong_FromSsize_t( (Py_ssize_t)RNA_property_int_get(ptr, prop) );
break;
case PROP_FLOAT:
ret = PyFloat_FromDouble( RNA_property_float_get(ptr, prop) );
@@ -424,7 +424,7 @@ static PyObject * pyrna_prop_to_py_index(PointerRNA *ptr, PropertyRNA *prop, int
ret = PyBool_FromLong( RNA_property_boolean_get_index(ptr, prop, index) );
break;
case PROP_INT:
- ret = PyLong_FromSize_t( (size_t)RNA_property_int_get_index(ptr, prop, index) );
+ ret = PyLong_FromSsize_t( (Py_ssize_t)RNA_property_int_get_index(ptr, prop, index) );
break;
case PROP_FLOAT:
ret = PyFloat_FromDouble( RNA_property_float_get_index(ptr, prop, index) );