C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in a couple places

This commit is contained in:
Skip Montanaro 2006-04-18 00:35:43 +00:00
parent 3fca463627
commit 429433b30b
6 changed files with 29 additions and 28 deletions

View file

@ -419,7 +419,7 @@ _PyLong_NumBits(PyObject *vv)
digit msd = v->ob_digit[ndigits - 1];
result = (ndigits - 1) * SHIFT;
if (result / SHIFT != ndigits - 1)
if (result / SHIFT != (size_t)(ndigits - 1))
goto Overflow;
do {
++result;
@ -953,7 +953,7 @@ PyLong_AsUnsignedLongLong(PyObject *vv)
if (vv == NULL || !PyLong_Check(vv)) {
PyErr_BadInternalCall();
return -1;
return (unsigned PY_LONG_LONG)-1;
}
res = _PyLong_AsByteArray(