summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-03-18 13:57:49 (GMT)
committerGitHub <noreply@github.com>2021-03-18 13:57:49 (GMT)
commiteec8e61992fb654d4cf58de4d727c18622b8303e (patch)
treecfd8c8904ff2d67c496eadc133e698963d6d7723 /Python/bltinmodule.c
parentfc980e0be19776ee05dfc5380eb5d6a8092935cb (diff)
downloadcpython-eec8e61992fb654d4cf58de4d727c18622b8303e.zip
cpython-eec8e61992fb654d4cf58de4d727c18622b8303e.tar.gz
cpython-eec8e61992fb654d4cf58de4d727c18622b8303e.tar.bz2
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.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 52591c4..4683103 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -4,6 +4,7 @@
#include <ctype.h>
#include "ast.h"
#undef Yield /* undefine macro conflicting with <winbase.h> */
+#include "pycore_ast.h" // _PyAST_Validate()
#include "pycore_object.h" // _Py_AddToAllObjects()
#include "pycore_pyerrors.h" // _PyErr_NoMemory()
#include "pycore_pystate.h" // _PyThreadState_GET()
@@ -835,7 +836,7 @@ builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
PyArena_Free(arena);
goto error;
}
- if (!PyAST_Validate(mod)) {
+ if (!_PyAST_Validate(mod)) {
PyArena_Free(arena);
goto error;
}