[Bf-blender-cvs] [3da1a75] master: correct recent cleanup for id-property types
Campbell Barton
noreply at git.blender.org
Thu Dec 18 02:00:23 CET 2014
Commit: 3da1a75b742d12f5308fdcec2f47f065a99e8f24
Author: Campbell Barton
Date: Thu Dec 18 02:06:57 2014 +0100
Branches: master
https://developer.blender.org/rB3da1a75b742d12f5308fdcec2f47f065a99e8f24
correct recent cleanup for id-property types
===================================================================
M source/blender/python/generic/idprop_py_api.c
===================================================================
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index e77ff8f..7fe282b 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -296,10 +296,10 @@ static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
}
/* returns NULL on success, error string on failure */
-static int idp_sequence_type(PyObject *seq_fast)
+static char idp_sequence_type(PyObject *seq_fast)
{
PyObject *item;
- int type = IDP_INT;
+ char type = IDP_INT;
Py_ssize_t i, len = PySequence_Fast_GET_SIZE(seq_fast);
for (i = 0; i < len; i++) {
@@ -403,7 +403,7 @@ bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group,
return false;
}
- if ((val.array.type = idp_sequence_type(ob_seq_fast)) == -1) {
+ if ((val.array.type = idp_sequence_type(ob_seq_fast)) == (char)-1) {
Py_DECREF(ob_seq_fast);
PyErr_SetString(PyExc_TypeError, "only floats, ints and dicts are allowed in ID property arrays");
return false;
More information about the Bf-blender-cvs
mailing list