Cleanup: use "num" as a suffix in: source/blender/python
See T85728
This commit is contained in:
@@ -20,14 +20,14 @@ typedef unsigned short ushort;
|
||||
|
||||
#ifdef DEBUG
|
||||
# define MATRIX_ITEM_ASSERT(_mat, _row, _col) \
|
||||
(BLI_assert(_row < (_mat)->num_row && _col < (_mat)->num_col))
|
||||
(BLI_assert(_row < (_mat)->row_num && _col < (_mat)->col_num))
|
||||
#else
|
||||
# define MATRIX_ITEM_ASSERT(_mat, _row, _col) (void)0
|
||||
#endif
|
||||
|
||||
#define MATRIX_ITEM_INDEX_NUMROW(_totrow, _row, _col) (((_totrow) * (_col)) + (_row))
|
||||
#define MATRIX_ITEM_INDEX(_mat, _row, _col) \
|
||||
(MATRIX_ITEM_ASSERT(_mat, _row, _col), (((_mat)->num_row * (_col)) + (_row)))
|
||||
(MATRIX_ITEM_ASSERT(_mat, _row, _col), (((_mat)->row_num * (_col)) + (_row)))
|
||||
#define MATRIX_ITEM_PTR(_mat, _row, _col) ((_mat)->matrix + MATRIX_ITEM_INDEX(_mat, _row, _col))
|
||||
#define MATRIX_ITEM(_mat, _row, _col) ((_mat)->matrix[MATRIX_ITEM_INDEX(_mat, _row, _col)])
|
||||
|
||||
@@ -36,8 +36,8 @@ typedef unsigned short ushort;
|
||||
|
||||
typedef struct {
|
||||
BASE_MATH_MEMBERS(matrix);
|
||||
ushort num_col;
|
||||
ushort num_row;
|
||||
ushort col_num;
|
||||
ushort row_num;
|
||||
} MatrixObject;
|
||||
|
||||
/* struct data contains a pointer to the actual data that the
|
||||
@@ -47,17 +47,17 @@ typedef struct {
|
||||
|
||||
/* prototypes */
|
||||
PyObject *Matrix_CreatePyObject(const float *mat,
|
||||
ushort num_col,
|
||||
ushort num_row,
|
||||
ushort col_num,
|
||||
ushort row_num,
|
||||
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
|
||||
PyObject *Matrix_CreatePyObject_wrap(float *mat,
|
||||
ushort num_col,
|
||||
ushort num_row,
|
||||
ushort col_num,
|
||||
ushort row_num,
|
||||
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_NONNULL(1);
|
||||
PyObject *Matrix_CreatePyObject_cb(PyObject *user,
|
||||
unsigned short num_col,
|
||||
unsigned short num_row,
|
||||
unsigned short col_num,
|
||||
unsigned short row_num,
|
||||
unsigned char cb_type,
|
||||
unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
@@ -65,8 +65,8 @@ PyObject *Matrix_CreatePyObject_cb(PyObject *user,
|
||||
* \param mat: Initialized matrix value to use in-place, allocated with #PyMem_Malloc
|
||||
*/
|
||||
PyObject *Matrix_CreatePyObject_alloc(float *mat,
|
||||
ushort num_col,
|
||||
ushort num_row,
|
||||
ushort col_num,
|
||||
ushort row_num,
|
||||
PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/* PyArg_ParseTuple's "O&" formatting helpers. */
|
||||
|
||||
Reference in New Issue
Block a user