summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/lib/libos.tex2
-rw-r--r--Modules/posixmodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex
index aafe7b1..c02d6a6 100644
--- a/Doc/lib/libos.tex
+++ b/Doc/lib/libos.tex
@@ -312,7 +312,7 @@ Availability: \UNIX, Windows.
\end{funcdesc}
\begin{funcdesc}{tmpfile}{}
-Return a new file object opened in update mode (\samp{w+}). The file
+Return a new file object opened in update mode (\samp{w+b}). The file
has no directory entries associated with it and will be automatically
deleted once there are no file descriptors for the file.
Availability: \UNIX, Windows.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9d7c3c2..95f4613 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -5194,7 +5194,7 @@ posix_tmpfile(PyObject *self, PyObject *args)
fp = tmpfile();
if (fp == NULL)
return posix_error();
- return PyFile_FromFile(fp, "<tmpfile>", "w+", fclose);
+ return PyFile_FromFile(fp, "<tmpfile>", "w+b", fclose);
}
#endif