From: Skip Montanaro Date: Tue, 18 Apr 2006 00:57:15 +0000 (+0000) Subject: C++ compiler cleanup: cast... X-Git-Tag: v2.5a2~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b507972cddd6a204d252ea87b839a38fb51225fe;p=thirdparty%2FPython%2Fcpython.git C++ compiler cleanup: cast... --- diff --git a/Python/getargs.c b/Python/getargs.c index f5e21546fc1f..1552790ef080 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -645,8 +645,8 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, unsigned int ival; if (float_argument_error(arg)) return converterr("integer", arg, msgbuf, bufsize); - ival = PyInt_AsUnsignedLongMask(arg); - if (ival == -1 && PyErr_Occurred()) + ival = (unsigned int)PyInt_AsUnsignedLongMask(arg); + if (ival == (unsigned int)-1 && PyErr_Occurred()) return converterr("integer", arg, msgbuf, bufsize); else *p = ival;