From: Neal Norwitz Date: Mon, 20 Feb 2006 18:57:39 +0000 (+0000) Subject: Based on discussion with Martin and Thomas on python-checkins X-Git-Tag: v2.5a0~570 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a276172391d186d80797c29ad0a1c32e22ac2d2;p=thirdparty%2FPython%2Fcpython.git Based on discussion with Martin and Thomas on python-checkins add a Py_SAFE_DOWNCAST() to make the code correct. --- diff --git a/Python/getargs.c b/Python/getargs.c index 530dffb61b98..fbf5ceff0e0c 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -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);