Mercurial > cpython-lru_cache-weakref
diff Objects/longobject.c @ 50026:de3094bb1421 3.0
Merged revisions 67588 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r67588 | mark.dickinson | 2008-12-05 17:14:29 +0000 (Fri, 05 Dec 2008) | 2 lines
Issue 4497: silence compiler warnings on Windows.
........
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2008 17:25:42 +0000 |
| parents | afb9808b0f30 |
| children | ad246cb4f662 92e21652f2f4 |
line wrap: on
line diff
--- a/Objects/longobject.c Fri Dec 05 08:32:07 2008 +0000 +++ b/Objects/longobject.c Fri Dec 05 17:25:42 2008 +0000 @@ -44,7 +44,7 @@ } #define CHECK_SMALL_INT(ival) \ do if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) { \ - return get_small_int(ival); \ + return get_small_int((int)ival); \ } while(0) static PyLongObject * @@ -198,7 +198,7 @@ v = _PyLong_New(1); if (v) { Py_SIZE(v) = sign; - v->ob_digit[0] = ival; + v->ob_digit[0] = (digit)ival; } return (PyObject*)v; } @@ -209,7 +209,7 @@ if (v) { Py_SIZE(v) = 2*sign; v->ob_digit[0] = (digit)ival & PyLong_MASK; - v->ob_digit[1] = ival >> PyLong_SHIFT; + v->ob_digit[1] = (digit)(ival >> PyLong_SHIFT); } return (PyObject*)v; } @@ -1103,7 +1103,7 @@ int ndigits = 0; if (ival < PyLong_BASE) - return PyLong_FromLong(ival); + return PyLong_FromLong((long)ival); /* Count the number of Python digits. */ t = (unsigned PY_LONG_LONG)ival; while (t) {
