Skip to content

Commit 3ad783a

Browse files
author
skip.montanaro
committed
C++ compiler cleanup: cast...
git-svn-id: http://svn.python.org/projects/python/trunk@45509 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent ee0e910 commit 3ad783a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/getargs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,8 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
645645
unsigned int ival;
646646
if (float_argument_error(arg))
647647
return converterr("integer<I>", arg, msgbuf, bufsize);
648-
ival = PyInt_AsUnsignedLongMask(arg);
649-
if (ival == -1 && PyErr_Occurred())
648+
ival = (unsigned int)PyInt_AsUnsignedLongMask(arg);
649+
if (ival == (unsigned int)-1 && PyErr_Occurred())
650650
return converterr("integer<I>", arg, msgbuf, bufsize);
651651
else
652652
*p = ival;

0 commit comments

Comments
 (0)