PyAPI_FUNC(int) PyAST_Validate(mod_ty);
-/* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
-PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty);
-
-/* Return the borrowed reference to the first literal string in the
- sequence of statements or NULL if it doesn't start from a literal string.
- Doesn't set exception. */
-PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_stmt_seq *);
-
#ifdef __cplusplus
}
#endif
--- /dev/null
+#ifndef Py_INTERNAL_AST_H
+#define Py_INTERNAL_AST_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef Py_BUILD_CORE
+# error "this header requires Py_BUILD_CORE define"
+#endif
+
+#include "Python-ast.h" // expr_ty
+
+/* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
+extern PyObject* _PyAST_ExprAsUnicode(expr_ty);
+
+/* Return the borrowed reference to the first literal string in the
+ sequence of statements or NULL if it doesn't start from a literal string.
+ Doesn't set exception. */
+extern PyObject* _PyAST_GetDocString(asdl_stmt_seq *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTERNAL_AST_H */
+
\
$(srcdir)/Include/internal/pycore_abstract.h \
$(srcdir)/Include/internal/pycore_accu.h \
+ $(srcdir)/Include/internal/pycore_ast.h \
$(srcdir)/Include/internal/pycore_ast_state.h \
$(srcdir)/Include/internal/pycore_atomic.h \
$(srcdir)/Include/internal/pycore_atomic_funcs.h \
<ClInclude Include="..\Include\import.h" />
<ClInclude Include="..\Include\internal\pycore_abstract.h" />
<ClInclude Include="..\Include\internal\pycore_accu.h" />
+ <ClInclude Include="..\Include\internal\pycore_ast.h" />
<ClInclude Include="..\Include\internal\pycore_ast_state.h" />
<ClInclude Include="..\Include\internal\pycore_atomic.h" />
<ClInclude Include="..\Include\internal\pycore_atomic_funcs.h" />
<ClInclude Include="..\Include\internal\pycore_accu.h">
<Filter>Include\internal</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\internal\pycore_ast.h">
+ <Filter>Include\internal</Filter>
+ </ClInclude>
<ClInclude Include="..\Include\internal\pycore_ast_state.h">
<Filter>Include\internal</Filter>
</ClInclude>
/* AST Optimizer */
#include "Python.h"
-#include "Python-ast.h"
-#include "ast.h"
+#include "pycore_ast.h" // _PyAST_GetDocString()
static int
*/
#include "Python.h"
+#include "pycore_ast.h" // _PyAST_GetDocString()
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
#include "pycore_long.h" // _PyLong_GetZero()
-#include "Python-ast.h"
-#include "ast.h"
-#include "code.h"
-#include "symtable.h"
+#include "symtable.h" // struct symtable
#define NEED_OPCODE_JUMP_TABLES
-#include "opcode.h"
-#include "wordcode_helpers.h"
+#include "opcode.h" // EXTENDED_ARG
+#include "wordcode_helpers.h" // instrsize()
+
#define DEFAULT_BLOCK_SIZE 16
#define DEFAULT_BLOCKS 8
#include "Python.h"
-#include "Python-ast.h"
-#include "token.h"
-#include "code.h"
-#include "symtable.h"
-#include "ast.h"
+#include "pycore_ast.h" // _PyAST_GetDocString()
#define UNDEFINED_FUTURE_FEATURE "future feature %.100s is not defined"
#define ERR_LATE_FUTURE \