summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2008-12-05 17:14:29 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2008-12-05 17:14:29 (GMT)
commit50b2b6eeacb49d46d194cfa8028788fe2a670d9e (patch)
treeee3397cabc90269295d8601faef1ae422450ac52 /Objects/longobject.c
parent48367816e9eba2256a5d8976a4a7008198030f93 (diff)
downloadcpython-50b2b6eeacb49d46d194cfa8028788fe2a670d9e.zip
cpython-50b2b6eeacb49d46d194cfa8028788fe2a670d9e.tar.gz
cpython-50b2b6eeacb49d46d194cfa8028788fe2a670d9e.tar.bz2
Issue 4497: silence compiler warnings on Windows.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 8f7ad4c..c28fe0a 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -44,7 +44,7 @@ get_small_int(int ival)
}
#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 @@ PyLong_FromLong(long ival)
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 @@ PyLong_FromLong(long ival)
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 @@ PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG ival)
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) {