diff options
Diffstat (limited to 'source/blender/python/generic/idprop_py_api.c')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index c3cbe7ddbf9..938a4cc8049 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -1002,22 +1002,22 @@ PyTypeObject BPy_IDGroup_Type = { /********Array Wrapper********/ -static PyTypeObject *idp_array_py_type(BPy_IDArray *self, short *is_double) +static PyTypeObject *idp_array_py_type(BPy_IDArray *self, bool *r_is_double) { switch (self->prop->subtype) { case IDP_FLOAT: - *is_double = 0; + *r_is_double = false; return &PyFloat_Type; case IDP_DOUBLE: - *is_double = 1; + *r_is_double = true; return &PyFloat_Type; case IDP_INT: - *is_double = 0; + *r_is_double = false; return &PyLong_Type; + default: + *r_is_double = false; + return NULL; } - - *is_double = 0; - return NULL; } static PyObject *BPy_IDArray_repr(BPy_IDArray *self) @@ -1188,7 +1188,7 @@ static PyObject *BPy_IDArray_slice(BPy_IDArray *self, int begin, int end) static int BPy_IDArray_ass_slice(BPy_IDArray *self, int begin, int end, PyObject *seq) { IDProperty *prop = self->prop; - short is_double = 0; + bool is_double; const PyTypeObject *py_type = idp_array_py_type(self, &is_double); const size_t elem_size = is_double ? sizeof(double) : sizeof(float); size_t alloc_len; |