summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-11 20:44:04 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-11 20:44:04 (GMT)
commit7844e38a988243b4f3d59feab0908246d37ea34c (patch)
treeba17b5c41fd0388632707e8ba3bbf41da012f6ac /Modules/arraymodule.c
parent6bf62dad9e83003a70aef4158df063697926ba7c (diff)
downloadcpython-7844e38a988243b4f3d59feab0908246d37ea34c.zip
cpython-7844e38a988243b4f3d59feab0908246d37ea34c.tar.gz
cpython-7844e38a988243b4f3d59feab0908246d37ea34c.tar.bz2
Keep Microsoft VC happy.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 5862f6c..e732f39 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -341,7 +341,7 @@ newarrayobject(size, descr)
}
nbytes = size * descr->itemsize;
/* Check for overflow */
- if (nbytes / descr->itemsize != size) {
+ if (nbytes / descr->itemsize != (size_t)size) {
return PyErr_NoMemory();
}
op = PyMem_NEW(arrayobject, 1);
@@ -933,7 +933,7 @@ array_tofile(self, args)
return NULL;
}
if (self->ob_size > 0) {
- if (fwrite(self->ob_item, self->ob_descr->itemsize,
+ if ((int)fwrite(self->ob_item, self->ob_descr->itemsize,
self->ob_size, fp) != self->ob_size) {
PyErr_SetFromErrno(PyExc_IOError);
clearerr(fp);