summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/concrete.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/c-api/concrete.rst b/Doc/c-api/concrete.rst
index 6cd4be4..e48056c 100644
--- a/Doc/c-api/concrete.rst
+++ b/Doc/c-api/concrete.rst
@@ -2425,6 +2425,12 @@ change in future releases of Python.
pointer, *fp*. The function *close* will be called when the file should be
closed. Return *NULL* on failure.
+.. cfunction:: PyFile_FromFileEx(FILE *fp, char *name, char *mode, int (*close)(FILE *), int buffering, char *encoding, char *newline)
+
+ Create a new :ctype:`PyFileObject` from the already-open standard C file
+ pointer, *fp*. The functions works similar to *PyFile_FromFile* but takes
+ optional arguments for *buffering*, *encoding* and *newline*. Use -1 resp.
+ *NULL* for default values.
.. cfunction:: FILE* PyFile_AsFile(PyObject *p)