commit | 0c644fcda095b12eedfb417f15429795c09196b6 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Fri Dec 15 23:42:33 2017 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 15 23:42:33 2017 -0800 |
tree | 5d1230628200ffa2c524269da9bc6781493a11c1 | |
parent | 9454060e84a669dde63824d9e2fcaf295e34f687 [diff] |
fix up signedness in PyImport_ExtendInittab (#4831) As a result of 92a3c6f493ad411e4cf0acdf305ef4876aa90669, the compiler complains: Python/import.c:2311:21: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare] if ((i + n + 1) <= PY_SSIZE_T_MAX / sizeof(struct _inittab)) { ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This overflow is extremely unlikely to happen, but let's avoid undefined behavior anyway.