bpo-1635741: Fix compiler warning in _stat.c (GH-19822)

Cast Py_ARRAY_LENGTH() size_t to int explicitly.
This commit is contained in:
Victor Stinner 2020-05-01 00:44:03 +02:00 committed by GitHub
parent 3c7f9db850
commit b66c0ff8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ stat_exec(PyObject *module)
"ST_CTIME"
};
for (int i = 0; i < Py_ARRAY_LENGTH(st_constants); i++) {
for (int i = 0; i < (int)Py_ARRAY_LENGTH(st_constants); i++) {
if (PyModule_AddIntConstant(module, st_constants[i], i) < 0) {
return -1;
}