[Python-checkins] r42524 - python/trunk/Python/getargs.c

neal.norwitz python-checkins at python.org
Mon Feb 20 19:57:42 CET 2006


Author: neal.norwitz
Date: Mon Feb 20 19:57:39 2006
New Revision: 42524

Modified:
   python/trunk/Python/getargs.c
Log:
Based on discussion with Martin and Thomas on python-checkins
add a Py_SAFE_DOWNCAST() to make the code correct.


Modified: python/trunk/Python/getargs.c
==============================================================================
--- python/trunk/Python/getargs.c	(original)
+++ python/trunk/Python/getargs.c	Mon Feb 20 19:57:39 2006
@@ -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);


More information about the Python-checkins mailing list