blob: 4f2408c7e8760899036e4b4d484e6f3c3b648483 [file] [log] [blame]
Steve Dowerb82e17e2019-05-23 08:45:22 -07001#ifndef Py_CPYTHON_FILEOBJECT_H
2# error "this header file must not be included directly"
3#endif
4
Steve Dowerb82e17e2019-05-23 08:45:22 -07005PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
6
7#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
8PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
9#endif
10
11#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
12PyAPI_DATA(int) Py_UTF8Mode;
13#endif
14
15/* The std printer acts as a preliminary sys.stderr until the new io
16 infrastructure is in place. */
17PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
18PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
19
20typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *);
21
22PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
23PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
24PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);