diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-05-10 07:10:12 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-05-10 07:10:12 (GMT) |
commit | 5467d4c0e31e9db305a4899a44d7978f83e96649 (patch) | |
tree | cf52a41492d6c1271a4f32ace0a62237daceb63a /Include/fileobject.h | |
parent | b7b4ce27f74901258f0b3af1fb9483d8f38feab8 (diff) | |
download | cpython-5467d4c0e31e9db305a4899a44d7978f83e96649.zip cpython-5467d4c0e31e9db305a4899a44d7978f83e96649.tar.gz cpython-5467d4c0e31e9db305a4899a44d7978f83e96649.tar.bz2 |
Patch #612627: Add encoding attribute to file objects, and determine
the terminal encoding on Windows and Unix.
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r-- | Include/fileobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h index c351b4d..e2053df 100644 --- a/Include/fileobject.h +++ b/Include/fileobject.h @@ -24,6 +24,7 @@ typedef struct { int f_newlinetypes; /* Types of newlines seen */ int f_skipnextlf; /* Skip next \n */ #endif + PyObject *f_encoding; } PyFileObject; PyAPI_DATA(PyTypeObject) PyFile_Type; @@ -33,6 +34,7 @@ PyAPI_DATA(PyTypeObject) PyFile_Type; PyAPI_FUNC(PyObject *) PyFile_FromString(char *, char *); PyAPI_FUNC(void) PyFile_SetBufSize(PyObject *, int); +PyAPI_FUNC(int) PyFile_SetEncoding(PyObject *, const char *); PyAPI_FUNC(PyObject *) PyFile_FromFile(FILE *, char *, char *, int (*)(FILE *)); PyAPI_FUNC(FILE *) PyFile_AsFile(PyObject *); |