Fix invalid function signatures for PySequenceMethods callbacks

Function casts hid casting between potentially incompatible type
signatures (using int instead of Py_ssize_t). As it happens this seems
not to have caused any bugs on supported platforms so this change is
mainly for correctness and to avoid problems in the future.
This commit is contained in:
Campbell Barton
2022-11-08 12:03:38 +11:00
parent 1140e001a0
commit 8f439bdc2d
15 changed files with 50 additions and 49 deletions

View File

@@ -89,7 +89,7 @@ static Py_ssize_t FEdge_sq_length(BPy_FEdge * /*self*/)
return 2;
}
static PyObject *FEdge_sq_item(BPy_FEdge *self, int keynum)
static PyObject *FEdge_sq_item(BPy_FEdge *self, Py_ssize_t keynum)
{
if (keynum < 0) {
keynum += FEdge_sq_length(self);