Commit 9a276172 authored by Neal Norwitz's avatar Neal Norwitz

Based on discussion with Martin and Thomas on python-checkins

add a Py_SAFE_DOWNCAST() to make the code correct.
parent e393bf6f
......@@ -284,7 +284,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
: len < min ? "at least" : "at most",
len < min ? min : max,
(len < min ? min : max) == 1 ? "" : "s",
(long)len);
Py_SAFE_DOWNCAST(len, Py_ssize_t, long));
message = msgbuf;
}
PyErr_SetString(PyExc_TypeError, message);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment