77extern "C" {
88#endif
99
10- #ifndef Py_LIMITED_API
11- PyAPI_FUNC (int ) PyRun_SimpleStringFlags (const char * , PyCompilerFlags * );
12- PyAPI_FUNC (int ) PyRun_AnyFileExFlags (
13- FILE * fp ,
14- const char * filename , /* decoded from the filesystem encoding */
15- int closeit ,
16- PyCompilerFlags * flags );
17- PyAPI_FUNC (int ) PyRun_SimpleFileExFlags (
18- FILE * fp ,
19- const char * filename , /* decoded from the filesystem encoding */
20- int closeit ,
21- PyCompilerFlags * flags );
22- PyAPI_FUNC (int ) PyRun_InteractiveOneFlags (
23- FILE * fp ,
24- const char * filename , /* decoded from the filesystem encoding */
25- PyCompilerFlags * flags );
26- PyAPI_FUNC (int ) PyRun_InteractiveOneObject (
27- FILE * fp ,
28- PyObject * filename ,
29- PyCompilerFlags * flags );
30- PyAPI_FUNC (int ) PyRun_InteractiveLoopFlags (
31- FIL
402E
E * fp ,
32- const char * filename , /* decoded from the filesystem encoding */
33- PyCompilerFlags * flags );
34-
35-
36- PyAPI_FUNC (PyObject * ) PyRun_StringFlags (const char * , int , PyObject * ,
37- PyObject * , PyCompilerFlags * );
38-
39- PyAPI_FUNC (PyObject * ) PyRun_FileExFlags (
40- FILE * fp ,
41- const char * filename , /* decoded from the filesystem encoding */
42- int start ,
43- PyObject * globals ,
44- PyObject * locals ,
45- int closeit ,
46- PyCompilerFlags * flags );
47- #endif
48-
49- #ifdef Py_LIMITED_API
5010PyAPI_FUNC (PyObject * ) Py_CompileString (const char * , const char * , int );
51- #else
52- #define Py_CompileString (str , p , s ) Py_CompileStringExFlags(str, p, s, NULL, -1)
53- #define Py_CompileStringFlags (str , p , s , f ) Py_CompileStringExFlags(str, p, s, f, -1)
54- PyAPI_FUNC (PyObject * ) Py_CompileStringExFlags (
55- const char * str ,
56- const char * filename , /* decoded from the filesystem encoding */
57- int start ,
58- PyCompilerFlags * flags ,
59- int optimize );
60- PyAPI_FUNC (PyObject * ) Py_CompileStringObject (
61- const char * str ,
62- PyObject * filename , int start ,
63- PyCompilerFlags * flags ,
64- int optimize );
65- #endif
11+
6612PyAPI_FUNC (struct symtable * ) Py_SymtableString (
6713 const char * str ,
6814 const char * filename , /* decoded from the filesystem encoding */
6915 int start );
70- #ifndef Py_LIMITED_API
71- PyAPI_FUNC (const char * ) _Py_SourceAsString (
72- PyObject * cmd ,
73- const char * funcname ,
74- const char * what ,
75- PyCompilerFlags * cf ,
76- PyObject * * cmd_copy );
77-
78- PyAPI_FUNC (struct symtable * ) Py_SymtableStringObject (
79- const char * str ,
80- PyObject * filename ,
81- int start );
82-
83- PyAPI_FUNC (struct symtable * ) _Py_SymtableStringObjectFlags (
84- const char * str ,
85- PyObject * filename ,
86- int start ,
87- PyCompilerFlags * flags );
88- #endif
8916
9017PyAPI_FUNC (void ) PyErr_Print (void );
9118PyAPI_FUNC (void ) PyErr_PrintEx (int );
9219PyAPI_FUNC (void ) PyErr_Display (PyObject * , PyObject * , PyObject * );
9320
94- #ifndef Py_LIMITED_API
95- /* A function flavor is also exported by libpython. It is required when
96- libpython is accessed directly rather than using header files which defines
97- macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to
98- export functions in pythonXX.dll. */
99- PyAPI_FUNC (PyObject * ) PyRun_String (const char * str , int s , PyObject * g , PyObject * l );
100- PyAPI_FUNC (int ) PyRun_AnyFile (FILE * fp , const char * name );
101- PyAPI_FUNC (int ) PyRun_AnyFileEx (FILE * fp , const char * name , int closeit );
102- PyAPI_FUNC (int ) PyRun_AnyFileFlags (FILE * , const char * , PyCompilerFlags * );
103- PyAPI_FUNC (int ) PyRun_SimpleString (const char * s );
104- PyAPI_FUNC (int ) PyRun_SimpleFile (FILE * f , const char * p );
105- PyAPI_FUNC (int ) PyRun_SimpleFileEx (FILE * f , const char * p , int c );
106- PyAPI_FUNC (int ) PyRun_InteractiveOne (FILE * f , const char * p );
107- PyAPI_FUNC (int ) PyRun_InteractiveLoop (FILE * f , const char * p );
108- PyAPI_FUNC (PyObject * ) PyRun_File (FILE * fp , const char * p , int s , PyObject * g , PyObject * l );
109- PyAPI_FUNC (PyObject * ) PyRun_FileEx (FILE * fp , const char * p , int s , PyObject * g , PyObject * l , int c );
110- PyAPI_FUNC (PyObject * ) PyRun_FileFlags (FILE * fp , const char * p , int s , PyObject * g , PyObject * l , PyCompilerFlags * flags );
111-
112- /* Use macros for a bunch of old variants */
113- #define PyRun_String (str , s , g , l ) PyRun_StringFlags(str, s, g, l, NULL)
114- #define PyRun_AnyFile (fp , name ) PyRun_AnyFileExFlags(fp, name, 0, NULL)
115- #define PyRun_AnyFileEx (fp , name , closeit ) \
116- PyRun_AnyFileExFlags(fp, name, closeit, NULL)
117- #define PyRun_AnyFileFlags (fp , name , flags ) \
118- PyRun_AnyFileExFlags(fp, name, 0, flags)
119- #define PyRun_SimpleString (s ) PyRun_SimpleStringFlags(s, NULL)
120- #define PyRun_SimpleFile (f , p ) PyRun_SimpleFileExFlags(f, p, 0, NULL)
121- #define PyRun_SimpleFileEx (f , p , c ) PyRun_SimpleFileExFlags(f, p, c, NULL)
122- #define PyRun_InteractiveOne (f , p ) PyRun_InteractiveOneFlags(f, p, NULL)
123- #define PyRun_InteractiveLoop (f , p ) PyRun_InteractiveLoopFlags(f, p, NULL)
124- #define PyRun_File (fp , p , s , g , l ) \
125- PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
126- #define PyRun_FileEx (fp , p , s , g , l , c ) \
127- PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
128- #define PyRun_FileFlags (fp , p , s , g , l , flags ) \
129- PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
130- #endif
13121
13222/* Stuff with no proper home (yet) */
133- #ifndef Py_LIMITED_API
134- PyAPI_FUNC (char * ) PyOS_Readline (FILE * , FILE * , const char * );
135- #endif
13623PyAPI_DATA (int ) (* PyOS_InputHook )(void );
13724PyAPI_DATA (char ) * (* PyOS_ReadlineFunctionPointer )(FILE * , FILE * , const char * );
138- #ifndef Py_LIMITED_API
139- PyAPI_DATA (PyThreadState * ) _PyOS_ReadlineTState ;
140- #endif
14125
14226/* Stack size, in "pointers" (so we get extra safety margins
14327 on 64-bit platforms). On a 32-bit platform, this translates
@@ -154,6 +38,12 @@ PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
15438PyAPI_FUNC (int ) PyOS_CheckStack (void );
15539#endif
15640
41+ #ifndef Py_LIMITED_API
42+ # define Py_CPYTHON_PYTHONRUN_H
43+ # include "cpython/pythonrun.h"
44+ # undef Py_CPYTHON_PYTHONRUN_H
45+ #endif
46+
15747#ifdef __cplusplus
15848}
15949#endif
0 commit comments