Skip to content

Commit b507972

Browse files
author
Skip Montanaro
committed
C++ compiler cleanup: cast...
1 parent 53a6d1d commit b507972

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)