1 /* File object interface (what's left of it -- see io.py) */
3 #ifndef Py_FILEOBJECT_H
4 #define Py_FILEOBJECT_H
9 #define PY_STDIOTEXTMODE "b"
11 PyAPI_FUNC(PyObject
*) PyFile_FromFd(int, char *, char *, int, char *, char *,
13 PyAPI_FUNC(PyObject
*) PyFile_GetLine(PyObject
*, int);
14 PyAPI_FUNC(int) PyFile_WriteObject(PyObject
*, PyObject
*, int);
15 PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject
*);
16 PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject
*);
17 PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject
*);
19 /* The default encoding used by the platform file system APIs
20 If non-NULL, this is different than the default encoding for strings
22 PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding
;
23 PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding
;
24 PyAPI_FUNC(int) _Py_SetFileSystemEncoding(PyObject
*);
28 The std printer acts as a preliminary sys.stderr until the new io
29 infrastructure is in place. */
30 PyAPI_FUNC(PyObject
*) PyFile_NewStdPrinter(int);
31 PyAPI_DATA(PyTypeObject
) PyStdPrinter_Type
;
33 #if defined _MSC_VER && _MSC_VER >= 1400
34 /* A routine to check if a file descriptor is valid on Windows. Returns 0
35 * and sets errno to EBADF if it isn't. This is to avoid Assertions
36 * from various functions in the Windows CRT beginning with
39 int _PyVerify_fd(int fd
);
41 #define _PyVerify_fd(A) (1) /* dummy */
47 #endif /* !Py_FILEOBJECT_H */