correct recent cleanup for id-property types

This commit is contained in:
Campbell Barton 2014-12-18 02:06:57 +01:00
parent b3b9e08423
commit 3da1a75b74
1 changed files with 3 additions and 3 deletions

View File

@ -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;