mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
eec8e61992
Remove the PyAST_Validate() function. It is no longer possible to
build a AST object (mod_ty type) with the public C API. The function
was already excluded from the limited C API (PEP 384).
Rename PyAST_Validate() function to _PyAST_Validate(), move it to the
internal C API, and don't export it anymore (replace PyAPI_FUNC with
extern).
The function was added in bpo-12575 by
the commit 832bfe2ebd
.
28 lines
653 B
C
28 lines
653 B
C
#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
|
|
|
|
extern int _PyAST_Validate(mod_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 */
|
|
|