summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-30 17:27:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-30 17:27:30 (GMT)
commit2dced8b602df10531cab6cd87da5503c06f14888 (patch)
treebf87d57eb4945b66b672aadfb87c071449391441 /Include
parent2673a5723433ff398fed901a8ebebb265031091e (diff)
downloadcpython-2dced8b602df10531cab6cd87da5503c06f14888.zip
cpython-2dced8b602df10531cab6cd87da5503c06f14888.tar.gz
cpython-2dced8b602df10531cab6cd87da5503c06f14888.tar.bz2
Patch 1329 (partial) by Christian Heimes.
Add a closefd flag to open() which can be set to False to prevent closing the file descriptor when close() is called or when the object is destroyed. Useful to ensure that sys.std{in,out,err} keep their file descriptors open when Python is uninitialized. (This was always a feature in 2.x, it just wasn't implemented in 3.0 yet.)
Diffstat (limited to 'Include')
-rw-r--r--Include/fileobject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index acb8c6d..ae127da 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -8,7 +8,8 @@ extern "C" {
#define PY_STDIOTEXTMODE "b"
-PyAPI_FUNC(PyObject *) PyFile_FromFd(int, char *, char *, int, char *, char *);
+PyAPI_FUNC(PyObject *) PyFile_FromFd(int, char *, char *, int, char *, char *,
+ int);
PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int);
PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);