File indexing completed on 2025-01-18 10:06:41
0001 #ifndef Py_CPYTHON_PYTHONRUN_H
0002 # error "this header file must not be included directly"
0003 #endif
0004
0005 PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
0006 PyAPI_FUNC(int) _PyRun_SimpleFileObject(
0007 FILE *fp,
0008 PyObject *filename,
0009 int closeit,
0010 PyCompilerFlags *flags);
0011 PyAPI_FUNC(int) PyRun_AnyFileExFlags(
0012 FILE *fp,
0013 const char *filename,
0014 int closeit,
0015 PyCompilerFlags *flags);
0016 PyAPI_FUNC(int) _PyRun_AnyFileObject(
0017 FILE *fp,
0018 PyObject *filename,
0019 int closeit,
0020 PyCompilerFlags *flags);
0021 PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
0022 FILE *fp,
0023 const char *filename,
0024 int closeit,
0025 PyCompilerFlags *flags);
0026 PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
0027 FILE *fp,
0028 const char *filename,
0029 PyCompilerFlags *flags);
0030 PyAPI_FUNC(int) PyRun_InteractiveOneObject(
0031 FILE *fp,
0032 PyObject *filename,
0033 PyCompilerFlags *flags);
0034 PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
0035 FILE *fp,
0036 const char *filename,
0037 PyCompilerFlags *flags);
0038 PyAPI_FUNC(int) _PyRun_InteractiveLoopObject(
0039 FILE *fp,
0040 PyObject *filename,
0041 PyCompilerFlags *flags);
0042
0043
0044 PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
0045 PyObject *, PyCompilerFlags *);
0046
0047 PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
0048 FILE *fp,
0049 const char *filename,
0050 int start,
0051 PyObject *globals,
0052 PyObject *locals,
0053 int closeit,
0054 PyCompilerFlags *flags);
0055
0056
0057 PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
0058 const char *str,
0059 const char *filename,
0060 int start,
0061 PyCompilerFlags *flags,
0062 int optimize);
0063 PyAPI_FUNC(PyObject *) Py_CompileStringObject(
0064 const char *str,
0065 PyObject *filename, int start,
0066 PyCompilerFlags *flags,
0067 int optimize);
0068
0069 #define Py_CompileString(str, p, s) Py_CompileStringExFlags((str), (p), (s), NULL, -1)
0070 #define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags((str), (p), (s), (f), -1)
0071
0072
0073 PyAPI_FUNC(const char *) _Py_SourceAsString(
0074 PyObject *cmd,
0075 const char *funcname,
0076 const char *what,
0077 PyCompilerFlags *cf,
0078 PyObject **cmd_copy);
0079
0080
0081
0082
0083
0084
0085 PyAPI_FUNC(PyObject *) PyRun_String(const char *str, int s, PyObject *g, PyObject *l);
0086 PyAPI_FUNC(int) PyRun_AnyFile(FILE *fp, const char *name);
0087 PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *fp, const char *name, int closeit);
0088 PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
0089 PyAPI_FUNC(int) PyRun_SimpleString(const char *s);
0090 PyAPI_FUNC(int) PyRun_SimpleFile(FILE *f, const char *p);
0091 PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *f, const char *p, int c);
0092 PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *f, const char *p);
0093 PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *f, const char *p);
0094 PyAPI_FUNC(PyObject *) PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l);
0095 PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c);
0096 PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, PyCompilerFlags *flags);
0097
0098
0099 #define PyRun_String(str, s, g, l) PyRun_StringFlags((str), (s), (g), (l), NULL)
0100 #define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags((fp), (name), 0, NULL)
0101 #define PyRun_AnyFileEx(fp, name, closeit) \
0102 PyRun_AnyFileExFlags((fp), (name), (closeit), NULL)
0103 #define PyRun_AnyFileFlags(fp, name, flags) \
0104 PyRun_AnyFileExFlags((fp), (name), 0, (flags))
0105 #define PyRun_SimpleString(s) PyRun_SimpleStringFlags((s), NULL)
0106 #define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags((f), (p), 0, NULL)
0107 #define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags((f), (p), (c), NULL)
0108 #define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags((f), (p), NULL)
0109 #define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags((f), (p), NULL)
0110 #define PyRun_File(fp, p, s, g, l) \
0111 PyRun_FileExFlags((fp), (p), (s), (g), (l), 0, NULL)
0112 #define PyRun_FileEx(fp, p, s, g, l, c) \
0113 PyRun_FileExFlags((fp), (p), (s), (g), (l), (c), NULL)
0114 #define PyRun_FileFlags(fp, p, s, g, l, flags) \
0115 PyRun_FileExFlags((fp), (p), (s), (g), (l), 0, (flags))
0116
0117
0118
0119 PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
0120 PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
0121 PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);