diff options
author | Guido van Rossum <guido@python.org> | 2007-10-19 23:16:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-19 23:16:50 (GMT) |
commit | ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (patch) | |
tree | 646cf27667087a48b908f330759fb94271b43f60 /Doc | |
parent | 75a902db7859a4751743e98530c5d96a672641be (diff) | |
download | cpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.zip cpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.tar.gz cpython-ce3a72aec6eaa0293c397c8d0407f7afe0072b2f.tar.bz2 |
Patch 1267 by Christian Heimes.
Move the initialization of sys.std{in,out,err} and __builtin__.open
to C code.
This solves the problem that "python -S" wouldn't work.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/concrete.rst | 6 | ||||
-rw-r--r-- | Doc/data/refcounts.dat | 9 |
2 files changed, 15 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) diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat index 4555301..5c3fc99 100644 --- a/Doc/data/refcounts.dat +++ b/Doc/data/refcounts.dat @@ -338,6 +338,15 @@ PyFile_FromFile:char*:name:: PyFile_FromFile:char*:mode:: PyFile_FromFile:int(*:close):: +PyFile_FromFileEx:PyObject*::+1: +PyFile_FromFileEx:FILE*:fp:: +PyFile_FromFileEx:char*:name:: +PyFile_FromFileEx:char*:mode:: +PyFile_FromFileEx:int(*:close):: +PyFile_FromFileEx:int:buffering:: +PyFile_FromFileEx:char*:encoding:: +PyFile_FromFileEx:char*:newline:: + PyFile_FromString:PyObject*::+1: PyFile_FromString:char*:name:: PyFile_FromString:char*:mode:: |