1 #ifndef Py_INTERNAL_COMPILE_H 2 #define Py_INTERNAL_COMPILE_H 3 #ifdef __cplusplus 4 extern "C" { 5 #endif 6 7 #ifndef Py_BUILD_CORE 8 # error "this header requires Py_BUILD_CORE define" 9 #endif 10 11 struct _arena; // Type defined in pycore_pyarena.h 12 struct _mod; // Type defined in pycore_ast.h 13 14 // Export the symbol for test_peg_generator (built as a library) 15 PyAPI_FUNC(PyCodeObject*) _PyAST_Compile( 16 struct _mod *mod, 17 PyObject *filename, 18 PyCompilerFlags *flags, 19 int optimize, 20 struct _arena *arena); 21 extern PyFutureFeatures* _PyFuture_FromAST( 22 struct _mod * mod, 23 PyObject *filename 24 ); 25 26 extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); 27 28 typedef 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 36 extern 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