From: Guido van Rossum Date: Fri, 21 Feb 1997 15:19:03 +0000 (+0000) Subject: Change all three fopen calls to use binary mode. X-Git-Tag: v1.5a1~328 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5680906cdbbd16c6ccbcbdd6656b721082ee295c;p=python Change all three fopen calls to use binary mode. --- diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 02005bb7dd..2619541502 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -249,7 +249,7 @@ sizeofimage(self, args) if (!PyArg_Parse(args, "s", &name)) return NULL; - inf = fopen(name, "r"); + inf = fopen(name, "rw"); if (!inf) { PyErr_SetString(ImgfileError, "can't open image file"); return NULL; @@ -289,7 +289,7 @@ longimagedata(self, args) if (!PyArg_Parse(args, "s", &name)) return NULL; - inf = fopen(name,"r"); + inf = fopen(name,"rb"); if (!inf) { PyErr_SetString(ImgfileError, "can't open image file"); return NULL; @@ -594,7 +594,7 @@ longstoimage(self, args) return NULL; goodwrite = 1; - outf = fopen(name, "w"); + outf = fopen(name, "wb"); if (!outf) { PyErr_SetString(ImgfileError, "can't open output file"); return NULL;