From c548fbf940dab7566b88a988868e8025de9aef1b Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Fri, 23 Aug 2002 16:27:40 +0000 Subject: [PATCH] backport gvanrossum's checkin of revision 2.234 of posixmodule.c SF bug 563750 (Alex Martelli): posix_tmpfile(): The file returned by tmpfile() has mode w+b, so use that in the call to PyFile_FromFile(). Bugfix candidate. --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e2d511410f6a..59c3efd15022 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -4478,7 +4478,7 @@ posix_tmpfile(PyObject *self, PyObject *args) fp = tmpfile(); if (fp == NULL) return posix_error(); - return PyFile_FromFile(fp, "", "w+", fclose); + return PyFile_FromFile(fp, "", "w+b", fclose); } #endif -- 2.47.3