summaryrefslogtreecommitdiffstats
path: root/Include/fileobject.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-03-15 17:42:16 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-03-15 17:42:16 (GMT)
commitf6eebbb4358d8749d5800814bab8c4cf3f068fbc (patch)
treee8286f6c1a7efcecfb70a8d9a9bb6ae8d743d5ce /Include/fileobject.h
parentd36cfe495ef6fa3fdeedc62a4fb28b9d77de7f04 (diff)
downloadcpython-f6eebbb4358d8749d5800814bab8c4cf3f068fbc.zip
cpython-f6eebbb4358d8749d5800814bab8c4cf3f068fbc.tar.gz
cpython-f6eebbb4358d8749d5800814bab8c4cf3f068fbc.tar.bz2
Patch #530105: Allow file object may to be subtyped
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r--Include/fileobject.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 632c436..0876cd2 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -7,6 +7,17 @@
extern "C" {
#endif
+typedef struct {
+ PyObject_HEAD
+ FILE *f_fp;
+ PyObject *f_name;
+ PyObject *f_mode;
+ int (*f_close)(FILE *);
+ int f_softspace; /* Flag used by 'print' command */
+ int f_binary; /* Flag which indicates whether the file is
+ open in binary (1) or test (0) mode */
+} PyFileObject;
+
extern DL_IMPORT(PyTypeObject) PyFile_Type;
#define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type)