summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index a5b45e3..3f7bf4d 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2644,8 +2644,8 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start)
b = PyLong_AsLongAndOverflow(item, &overflow);
}
if (overflow == 0 &&
- (i_result >= 0 ? (b <= LONG_MAX - i_result)
- : (b >= LONG_MIN - i_result)))
+ (i_result >= 0 ? (b <= PY_SSIZE_T_MAX - i_result)
+ : (b >= PY_SSIZE_T_MIN - i_result)))
{
i_result += b;
Py_DECREF(item);