Skip to content

Commit 11b97e6

Browse files
author
neal.norwitz
committed
Based on discussion with Martin and Thomas on python-checkins
add a Py_SAFE_DOWNCAST() to make the code correct. git-svn-id: http://svn.python.org/projects/python/trunk@42524 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 8ae0e32 commit 11b97e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/getargs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
284284
: len < min ? "at least" : "at most",
285285
len < min ? min : max,
286286
(len < min ? min : max) == 1 ? "" : "s",
287-
(long)len);
287+
Py_SAFE_DOWNCAST(len, Py_ssize_t, long));
288288
message = msgbuf;
289289
}
290290
PyErr_SetString(PyExc_TypeError, message);

0 commit comments

Comments
 (0)