blob: 57eac13c064c2e8905bd8c1d57c93405b7c00842 [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
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
10
11#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
12PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
13#endif
14
15#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
16PyAPI_DATA(int) Py_UTF8Mode;
17#endif
18
19/* The std printer acts as a preliminary sys.stderr until the new io
20 infrastructure is in place. */
21PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
22PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
23
24typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *);
25
26PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
27PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
28PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
29
30#ifdef __cplusplus
31}
32#endif