diff options
Diffstat (limited to 'Modules/rgbimgmodule.c')
-rw-r--r-- | Modules/rgbimgmodule.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 8c70d95..67b5521 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -168,7 +168,7 @@ putlong(FILE *outf, Py_UInt32 val) buf[1] = (unsigned char) (val >> 16); buf[2] = (unsigned char) (val >> 8); buf[3] = (unsigned char) (val >> 0); - return fwrite(buf, 4, 1, outf); + return (int)fwrite(buf, 4, 1, outf); } static void @@ -200,7 +200,7 @@ writeheader(FILE *outf, IMAGE *image) putlong(outf, image->min); putlong(outf, image->max); putlong(outf, 0); - return fwrite("no name", 8, 1, outf); + return (int)fwrite("no name", 8, 1, outf); } static int @@ -567,7 +567,8 @@ longstoimage(PyObject *self, PyObject *args) Py_Int32 *starttab = NULL, *lengthtab = NULL; unsigned char *rlebuf = NULL; unsigned char *lumbuf = NULL; - int rlebuflen, goodwrite; + int rlebuflen; + Py_ssize_t goodwrite; PyObject *retval = NULL; if (!PyArg_ParseTuple(args, "s#iiis:longstoimage", &lptr, &len, |