1#ifndef Py_INTERNAL_COMPILE_H 2#define Py_INTERNAL_COMPILE_H 3#ifdef __cplusplus 4extern "C" { 5#endif 6 7#ifndef Py_BUILD_CORE 8# error "this header requires Py_BUILD_CORE define" 9#endif 10 11struct _arena; // Type defined in pycore_pyarena.h 12struct _mod; // Type defined in pycore_ast.h 13 14// Export the symbol for test_peg_generator (built as a library) 15PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 struct _mod *mod, 17 PyObject *filename, 18 PyCompilerFlags *flags, 19 int optimize, 20 struct _arena *arena); 21extern PyFutureFeatures* _PyFuture_FromAST( 22 struct _mod * mod, 23 PyObject *filename 24 ); 25 26extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 28typedef struct { 29 int optimize; 30 int ff_features; 31 32 int recursion_depth; /* current recursion depth */ 33 int recursion_limit; /* recursion limit */ 34} _PyASTOptimizeState; 35 36extern int _PyAST_Optimize( 37 struct _mod *, 38 struct _arena *arena, 39 _PyASTOptimizeState *state); 40 41#ifdef __cplusplus 42} 43#endif 44#endif /* !Py_INTERNAL_COMPILE_H */ 45