@@ -29,46 +29,37 @@ PyAPI_FUNC(int) Py_IsInitialized(void);
2929PyAPI_FUNC (PyThreadState * ) Py_NewInterpreter (void );
3030PyAPI_FUNC (void ) Py_EndInterpreter (PyThreadState * );
3131
32- PyAPI_FUNC (int ) PyRun_AnyFile (FILE * , const char * );
33- PyAPI_FUNC (int ) PyRun_AnyFileEx (FILE * , const char * , int );
34-
35- PyAPI_FUNC (int ) PyRun_AnyFileFlags (FILE * , const char * , PyCompilerFlags * );
36- PyAPI_FUNC (int ) PyRun_AnyFileExFlags (FILE * , const char * , int , PyCompilerFlags * );
37-
38- PyAPI_FUNC (int ) PyRun_SimpleString (const char * );
32+ PyAPI_FUNC (int ) PyRun_AnyFileFlags (FILE * , char * , PyCompilerFlags * );
33+ PyAPI_FUNC (int ) PyRun_AnyFileExFlags (FILE * , char * , int , PyCompilerFlags * );
3934PyAPI_FUNC (int ) PyRun_SimpleStringFlags (const char * , PyCompilerFlags * );
40- PyAPI_FUNC (int ) PyRun_SimpleFile (FILE * , const char * );
41- PyAPI_FUNC (int ) PyRun_SimpleFileEx (FILE * , const char * , int );
4235PyAPI_FUNC (int ) PyRun_SimpleFileExFlags (FILE * , const char * , int , PyCompilerFlags * );
43- PyAPI_FUNC (int ) PyRun_InteractiveOne (FILE * , const char * );
4436PyAPI_FUNC (int ) PyRun_InteractiveOneFlags (FILE * , const char * , PyCompilerFlags * );
45- PyAPI_FUNC (int ) PyRun_InteractiveLoop (FILE * , const char * );
4637PyAPI_FUNC (int ) PyRun_InteractiveLoopFlags (FILE * , const char * , PyCompilerFlags * );
4738
48- PyAPI_FUNC (struct _node * ) PyParser_SimpleParseString (const char * , int );
49- PyAPI_FUNC (struct _node * ) PyParser_SimpleParseFile (FILE * , const char * , int );
50- PyAPI_FUNC (struct _node * ) PyParser_SimpleParseStringFlags (const char * , int , int );
51- PyAPI_FUNC (struct _node * ) PyParser_SimpleParseStringFlagsFilename (const char * ,
52- const char * ,
53- int ,
54- int );
39+ PyAPI_FUNC (struct _mod * ) PyParser_ASTFromString (const char * , const char * ,
40+ int , PyCompilerFlags * flags );
41+ PyAPI_FUNC (struct _mod * ) PyParser_ASTFromFile (FILE * , const char * , int ,
42+ char * , char * ,
43+ PyCompilerFlags * , int * );
44+ #define PyParser_SimpleParseString (S , B ) \
45+ PyParser_SimpleParseStringFlags(S, B, 0)
46+ #define PyParser_SimpleParseFile (FP , S , B ) \
47+ PyParser_SimpleParseFileFlags(FP, S, B, 0)
48+ PyAPI_FUNC (struct _node * ) PyParser_SimpleParseStringFlags (const char * , int ,
49+ int );
5550PyAPI_FUNC (struct _node * ) PyParser_SimpleParseFileFlags (FILE * , const char * ,
5651 int , int );
5752
58- PyAPI_FUNC (PyObject * ) PyRun_String (const char * , int , PyObject * , PyObject * );
59- PyAPI_FUNC (PyObject * ) PyRun_File (FILE * , const char * , int , PyObject * , PyObject * );
60- PyAPI_FUNC (PyObject * ) PyRun_FileEx (FILE * , const char * , int ,
61- PyObject * , PyObject * , int );
62- PyAPI_FUNC (PyObject * ) PyRun_StringFlags (const char * , int , PyObject * , PyObject * ,
63- PyCompilerFlags * );
64- PyAPI_FUNC (PyObject * ) PyRun_FileFlags (FILE * , const char * , int , PyObject * ,
65- PyObject * , PyCompilerFlags * );
66- PyAPI_FUNC (PyObject * ) PyRun_FileExFlags (FILE * , const char * , int , PyObject * ,
67- PyObject * , int , PyCompilerFlags * );
68-
69- PyAPI_FUNC (PyObject * ) Py_CompileString (const char * , const char * , int );
53+ PyAPI_FUNC (PyObject * ) PyRun_StringFlags (const char * , int , PyObject * ,
54+ PyObject * , PyCompilerFlags * );
55+
56+ PyAPI_FUNC (PyObject * ) PyRun_FileExFlags (FILE * , const char * , int ,
57+ PyObject * , PyObject * , int ,
58+ PyCompilerFlags * );
59+
60+ #define Py_CompileString (str , p , s ) Py_CompileStringFlags(str, p, s, NULL)
7061PyAPI_FUNC (PyObject * ) Py_CompileStringFlags (const char * , const char * , int ,
71- PyCompilerFlags * );
62+ PyCompilerFlags * );
7263PyAPI_FUNC (struct symtable * ) Py_SymtableString (const char * , const char * , int );
7364
7465PyAPI_FUNC (void ) PyErr_Print (void );
@@ -84,6 +75,25 @@ PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
8475/* Bootstrap */
8576PyAPI_FUNC (int ) Py_Main (int argc , char * * argv );
8677
78+ /* Use macros for a bunch of old variants */
79+ #define PyRun_String (str , s , g , l ) PyRun_StringFlags(str, s, g, l, NULL)
80+ #define PyRun_AnyFile (fp , name ) PyRun_AnyFileExFlags(fp, name, 0, NULL)
81+ #define PyRun_AnyFileEx (fp , name , closeit ) \
82+ PyRun_AnyFileExFlags(fp, name, closeit, NULL)
83+ #define PyRun_AnyFileFlags (fp , name , flags ) \
84+ PyRun_AnyFileExFlags(fp, name, 0, flags)
85+ #define PyRun_SimpleString (s , f ) PyRunSimpleStringFlags(s, f, NULL)
86+ #define PyRun_SimpleFile (f , p ) PyRun_SimpleFileExFlags(f, p, 0, NULL)
87+ #define PyRun_SimpleFileEx (f , p , c ) PyRun_SimpleFileExFlags(f, p, c, NULL)
88+ #define PyRun_InteractiveOne (f , p ) PyRun_InteractiveOneFlags(f, p, NULL)
89+ #define PyRun_InteractiveLoop (f , p ) PyRun_InteractiveLoopFlags(f, p, NULL)
90+ #define PyRun_File (fp , p , s , g , l ) \
91+ PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
92+ #define PyRun_FileEx (fp , p , s , g , l , c ) \
93+ PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
94+ #define PyRun_FileFlags (fp , p , s , g , l , flags ) \
95+ PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
96+
8797/* In getpath.c */
8898PyAPI_FUNC (char * ) Py_GetProgramFullPath (void );
8999PyAPI_FUNC (char * ) Py_GetPrefix (void );
0 commit comments