Based on discussion with Martin and Thomas on python-checkins

add a Py_SAFE_DOWNCAST() to make the code correct.
This commit is contained in:
Neal Norwitz 2006-02-20 18:57:39 +00:00
parent e393bf6fe3
commit 9a27617239
1 changed files with 1 additions and 1 deletions

View File

@ -284,7 +284,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
: len < min ? "at least" : "at most", : len < min ? "at least" : "at most",
len < min ? min : max, len < min ? min : max,
(len < min ? min : max) == 1 ? "" : "s", (len < min ? min : max) == 1 ? "" : "s",
(long)len); Py_SAFE_DOWNCAST(len, Py_ssize_t, long));
message = msgbuf; message = msgbuf;
} }
PyErr_SetString(PyExc_TypeError, message); PyErr_SetString(PyExc_TypeError, message);