mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-43244: Add pycore_ast.h header file (GH-24908)
Move _PyAST_GetDocString() and _PyAST_ExprAsUnicode() functions the internal C API: from Include/ast.h to a new Include/internal/pycore_ast.h header file. Don't export these functions anymore: replace PyAPI_FUNC() with extern. Remove also unused includes.
This commit is contained in:
parent
b4536e1c6a
commit
526fdeb227
8 changed files with 37 additions and 21 deletions
|
@ -1,7 +1,6 @@
|
|||
/* AST Optimizer */
|
||||
#include "Python.h"
|
||||
#include "Python-ast.h"
|
||||
#include "ast.h"
|
||||
#include "pycore_ast.h" // _PyAST_GetDocString()
|
||||
|
||||
|
||||
static int
|
||||
|
|
|
@ -22,16 +22,15 @@
|
|||
*/
|
||||
|
||||
#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
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
#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 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue