annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/fileobject.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /* File object interface (what's left of it -- see io.py) */
jpayne@69 2
jpayne@69 3 #ifndef Py_FILEOBJECT_H
jpayne@69 4 #define Py_FILEOBJECT_H
jpayne@69 5 #ifdef __cplusplus
jpayne@69 6 extern "C" {
jpayne@69 7 #endif
jpayne@69 8
jpayne@69 9 #define PY_STDIOTEXTMODE "b"
jpayne@69 10
jpayne@69 11 PyAPI_FUNC(PyObject *) PyFile_FromFd(int, const char *, const char *, int,
jpayne@69 12 const char *, const char *,
jpayne@69 13 const char *, int);
jpayne@69 14 PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int);
jpayne@69 15 PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
jpayne@69 16 PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);
jpayne@69 17 PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
jpayne@69 18
jpayne@69 19 /* The default encoding used by the platform file system APIs
jpayne@69 20 If non-NULL, this is different than the default encoding for strings
jpayne@69 21 */
jpayne@69 22 PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
jpayne@69 23 PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
jpayne@69 24
jpayne@69 25 /* A routine to check if a file descriptor can be select()-ed. */
jpayne@69 26 #ifdef _MSC_VER
jpayne@69 27 /* On Windows, any socket fd can be select()-ed, no matter how high */
jpayne@69 28 #define _PyIsSelectable_fd(FD) (1)
jpayne@69 29 #else
jpayne@69 30 #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
jpayne@69 31 #endif
jpayne@69 32
jpayne@69 33 #ifndef Py_LIMITED_API
jpayne@69 34 # define Py_CPYTHON_FILEOBJECT_H
jpayne@69 35 # include "cpython/fileobject.h"
jpayne@69 36 # undef Py_CPYTHON_FILEOBJECT_H
jpayne@69 37 #endif
jpayne@69 38
jpayne@69 39 #ifdef __cplusplus
jpayne@69 40 }
jpayne@69 41 #endif
jpayne@69 42 #endif /* !Py_FILEOBJECT_H */