Fix incorrect integer type for MatrixAccess length access

In practice this worked for x64 however it could theoretically return
an invalid length.
This commit is contained in:
Campbell Barton
2023-07-21 12:50:02 +10:00
parent 62deac09c3
commit 3844ac227d

View File

@@ -3654,7 +3654,7 @@ static void MatrixAccess_dealloc(MatrixAccessObject *self)
/** \name Matrix-Access Type: Sequence Protocol
* \{ */
static int MatrixAccess_len(MatrixAccessObject *self)
static Py_ssize_t MatrixAccess_len(MatrixAccessObject *self)
{
return (self->type == MAT_ACCESS_ROW) ? self->matrix_user->row_num : self->matrix_user->col_num;
}