diff Python/getargs.c @ 36625:bddc13d57b88 legacy-trunk

Based on discussion with Martin and Thomas on python-checkins add a Py_SAFE_DOWNCAST() to make the code correct.
author Neal Norwitz <nnorwitz@gmail.com>
date Mon, 20 Feb 2006 18:57:39 +0000
parents cab36aaee2e3
children dba6494735d0
line wrap: on
line diff
--- a/Python/getargs.c	Mon Feb 20 17:37:36 2006 +0000
+++ b/Python/getargs.c	Mon Feb 20 18:57:39 2006 +0000
@@ -284,7 +284,7 @@
 				      : 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);