4 #ifndef Py_FILEOBJECT_H
5 #define Py_FILEOBJECT_H
37 #define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type)
38 #define PyFile_CheckExact(op) (Py_TYPE(op) == &PyFile_Type)
42 PyAPI_FUNC(
int) PyFile_SetEncoding(PyObject *, const
char *);
48 PyAPI_FUNC(
void) PyFile_DecUseCount(PyFileObject *);
49 PyAPI_FUNC(PyObject *) PyFile_Name(PyObject *);
50 PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *,
int);
51 PyAPI_FUNC(
int) PyFile_WriteObject(PyObject *, PyObject *,
int);
52 PyAPI_FUNC(
int) PyFile_SoftSpace(PyObject *,
int);
53 PyAPI_FUNC(
int) PyFile_WriteString(const
char *, PyObject *);
54 PyAPI_FUNC(
int) PyObject_AsFileDescriptor(PyObject *);
59 PyAPI_DATA(const
char *) Py_FileSystemDefaultEncoding;
64 #define PY_STDIOTEXTMODE "b"
73 #if defined _MSC_VER && _MSC_VER >= 1400
80 #elif defined _MSC_VER && _MSC_VER >= 1200
82 #define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0)
84 #define _PyVerify_fd(A) (1)
89 #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
91 #define _PyIsSelectable_fd(FD) (1)