bpo-43244: Remove the PyAST_Validate() function (GH-24911)
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 832bfe2ebd5ecfa92031cd40c8b41835ba90487f.
diff --git a/Python/ast.c b/Python/ast.c
index c58b4a6..8ac2e60 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -551,7 +551,7 @@ validate_exprs(asdl_expr_seq *exprs, expr_context_ty ctx, int null_ok)
}
int
-PyAST_Validate(mod_ty mod)
+_PyAST_Validate(mod_ty mod)
{
int res = 0;