File indexing completed on 2025-01-18 10:06:49
0001
0002
0003 #ifndef Py_FILEOBJECT_H
0004 #define Py_FILEOBJECT_H
0005 #ifdef __cplusplus
0006 extern "C" {
0007 #endif
0008
0009 #define PY_STDIOTEXTMODE "b"
0010
0011 PyAPI_FUNC(PyObject *) PyFile_FromFd(int, const char *, const char *, int,
0012 const char *, const char *,
0013 const char *, int);
0014 PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int);
0015 PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
0016 PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);
0017 PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
0018
0019
0020
0021
0022 Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
0023 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
0024 Py_DEPRECATED(3.12) PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
0025 #endif
0026 Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
0027
0028 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
0029 Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_UTF8Mode;
0030 #endif
0031
0032
0033 #ifdef _MSC_VER
0034
0035 #define _PyIsSelectable_fd(FD) (1)
0036 #else
0037 #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
0038 #endif
0039
0040 #ifndef Py_LIMITED_API
0041 # define Py_CPYTHON_FILEOBJECT_H
0042 # include "cpython/fileobject.h"
0043 # undef Py_CPYTHON_FILEOBJECT_H
0044 #endif
0045
0046 #ifdef __cplusplus
0047 }
0048 #endif
0049 #endif