From 31cb14f5de10903d8d057ea539d5fea7fff8974a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 29 Jul 2015 10:37:39 +1000 Subject: Cleanup: check exact error w/ mathutils functions --- source/blender/python/mathutils/mathutils_Matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/python/mathutils') diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 817173c5bc6..aba1f909371 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -843,7 +843,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args) /* 3 or 4, apply as 3x3, resize later if needed */ float factor[2]; - if (mathutils_array_parse(factor, 2, 2, fac, "Matrix.Shear()") < 0) { + if (mathutils_array_parse(factor, 2, 2, fac, "Matrix.Shear()") == -1) { return NULL; } @@ -2122,7 +2122,7 @@ static int Matrix_ass_item_row(MatrixObject *self, int row, PyObject *value) return -1; } - if (mathutils_array_parse(vec, self->num_col, self->num_col, value, "matrix[i] = value assignment") < 0) { + if (mathutils_array_parse(vec, self->num_col, self->num_col, value, "matrix[i] = value assignment") == -1) { return -1; } @@ -2147,7 +2147,7 @@ static int Matrix_ass_item_col(MatrixObject *self, int col, PyObject *value) return -1; } - if (mathutils_array_parse(vec, self->num_row, self->num_row, value, "matrix[i] = value assignment") < 0) { + if (mathutils_array_parse(vec, self->num_row, self->num_row, value, "matrix[i] = value assignment") == -1) { return -1; } @@ -2224,7 +2224,7 @@ static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *va PyObject *item = PySequence_Fast_GET_ITEM(value_fast, row - begin); if (mathutils_array_parse(vec, self->num_col, self->num_col, item, - "matrix[begin:end] = value assignment") < 0) + "matrix[begin:end] = value assignment") == -1) { return -1; } -- cgit v1.2.3