File tree Expand file tree Collapse file tree 8 files changed +37
-21
lines changed Expand file tree Collapse file tree 8 files changed +37
-21
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,6 @@ extern "C" {
9
9
10
10
PyAPI_FUNC (int ) PyAST_Validate (mod_ty );
11
11
12
- /* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
13
- PyAPI_FUNC (PyObject * ) _PyAST_ExprAsUnicode (expr_ty );
14
-
15
- /* Return the borrowed reference to the first literal string in the
16
- sequence of statements or NULL if it doesn't start from a literal string.
17
- Doesn't set exception. */
18
- PyAPI_FUNC (PyObject * ) _PyAST_GetDocString (asdl_stmt_seq * );
19
-
20
12
#ifdef __cplusplus
21
13
}
22
14
#endif
Original file line number Diff line number Diff line change
1
+ #ifndef Py_INTERNAL_AST_H
2
+ #define Py_INTERNAL_AST_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
+ #include "Python-ast.h" // expr_ty
12
+
13
+ /* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
14
+ extern PyObject * _PyAST_ExprAsUnicode (expr_ty );
15
+
16
+ /* Return the borrowed reference to the first literal string in the
17
+ sequence of statements or NULL if it doesn't start from a literal string.
18
+ Doesn't set exception. */
19
+ extern PyObject * _PyAST_GetDocString (asdl_stmt_seq * );
20
+
21
+ #ifdef __cplusplus
22
+ }
23
+ #endif
24
+ #endif /* !Py_INTERNAL_AST_H */
25
+
Original file line number Diff line number Diff line change @@ -1135,6 +1135,7 @@ PYTHON_HEADERS= \
1135
1135
\
1136
1136
$(srcdir)/Include/internal/pycore_abstract.h \
1137
1137
$(srcdir)/Include/internal/pycore_accu.h \
1138
+ $(srcdir)/Include/internal/pycore_ast.h \
1138
1139
$(srcdir)/Include/internal/pycore_ast_state.h \
1139
1140
$(srcdir)/Include/internal/pycore_atomic.h \
1140
1141
$(srcdir)/Include/internal/pycore_atomic_funcs.h \
Original file line number Diff line number Diff line change 175
175
<ClInclude Include =" ..\Include\import.h" />
176
176
<ClInclude Include =" ..\Include\internal\pycore_abstract.h" />
177
177
<ClInclude Include =" ..\Include\internal\pycore_accu.h" />
178
+ <ClInclude Include =" ..\Include\internal\pycore_ast.h" />
178
179
<ClInclude Include =" ..\Include\internal\pycore_ast_state.h" />
179
180
<ClInclude Include =" ..\Include\internal\pycore_atomic.h" />
180
181
<ClInclude Include =" ..\Include\internal\pycore_atomic_funcs.h" />
Original file line number Diff line number Diff line change 486
486
<ClInclude Include =" ..\Include\internal\pycore_accu.h" >
487
487
<Filter >Include\internal</Filter >
488
488
</ClInclude >
489
+ <ClInclude Include =" ..\Include\internal\pycore_ast.h" >
490
+ <Filter >Include\internal</Filter >
491
+ </ClInclude >
489
492
<ClInclude Include =" ..\Include\internal\pycore_ast_state.h" >
490
493
<Filter >Include\internal</Filter >
491
494
</ClInclude >
Original file line number Diff line number Diff line change 1
1
/* AST Optimizer */
2
2
#include "Python.h"
3
- #include "Python-ast.h"
4
- #include "ast.h"
3
+ #include "pycore_ast.h" // _PyAST_GetDocString()
5
4
6
5
7
6
static int
Original file line number Diff line number Diff line change 22
22
*/
23
23
24
24
#include "Python.h"
25
+ #include "pycore_ast.h" // _PyAST_GetDocString()
25
26
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
26
27
#include "pycore_long.h" // _PyLong_GetZero()
27
28
28
- #include "Python-ast.h"
29
- #include "ast.h"
30
- #include "code.h"
31
- #include "symtable.h"
29
+ #include "symtable.h" // struct symtable
32
30
#define NEED_OPCODE_JUMP_TABLES
33
- #include "opcode.h"
34
- #include "wordcode_helpers.h"
31
+ #include "opcode.h" // EXTENDED_ARG
32
+ #include "wordcode_helpers.h" // instrsize()
33
+
35
34
36
35
#define DEFAULT_BLOCK_SIZE 16
37
36
#define DEFAULT_BLOCKS 8
Original file line number Diff line number Diff line change 1
1
#include "Python.h"
2
- #include "Python-ast.h"
3
- #include "token.h"
4
- #include "code.h"
5
- #include "symtable.h"
6
- #include "ast.h"
2
+ #include "pycore_ast.h" // _PyAST_GetDocString()
7
3
8
4
#define UNDEFINED_FUTURE_FEATURE "future feature %.100s is not defined"
9
5
#define ERR_LATE_FUTURE \
You can’t perform that action at this time.
0 commit comments