diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2d68c9dbb4..70b15360a2 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -5380,7 +5380,7 @@ parse_file_actions(PyObject *file_actions, return -1; } - for (int i = 0; i < PySequence_Fast_GET_SIZE(seq); ++i) { + for (Py_ssize_t i = 0; i < PySequence_Fast_GET_SIZE(seq); ++i) { file_action = PySequence_Fast_GET_ITEM(seq, i); Py_INCREF(file_action); if (!PyTuple_Check(file_action) || !PyTuple_GET_SIZE(file_action)) {