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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b507972cddd6a204d252ea87b839a38fb51225fe;p=python C++ compiler cleanup: cast... --- diff --git a/Python/getargs.c b/Python/getargs.c index f5e21546fc..1552790ef0 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;