summaryrefslogtreecommitdiff
path: root/Python/future.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-03-24 00:51:50 +0100
committerGitHub <noreply@github.com>2021-03-24 00:51:50 +0100
commita81fca6ec8e0f748f8eafa12fb12cf9e12df465c (patch)
tree955b952d9953f5ba3ed487512ac9f67267ddd4f4 /Python/future.c
parentf0a6fde8827d5d4f7a1c741ab1a8b206b66ffd57 (diff)
downloadcpython-git-a81fca6ec8e0f748f8eafa12fb12cf9e12df465c.tar.gz
bpo-43244: Add pycore_compile.h header file (GH-25000)
Remove the compiler functions using "struct _mod" type, because the public AST C API was removed: * PyAST_Compile() * PyAST_CompileEx() * PyAST_CompileObject() * PyFuture_FromAST() * PyFuture_FromASTObject() These functions were undocumented and excluded from the limited C API. Rename functions: * PyAST_CompileObject() => _PyAST_Compile() * PyFuture_FromASTObject() => _PyFuture_FromAST() Moreover, _PyFuture_FromAST() is no longer exported (replace PyAPI_FUNC() with extern). _PyAST_Compile() remains exported for test_peg_generator. Remove also compatibility functions: * PyAST_Compile() * PyAST_CompileEx() * PyFuture_FromAST()
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/Python/future.c b/Python/future.c
index 37e7a22f81..05ade8e250 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -116,7 +116,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename)
PyFutureFeatures *
-PyFuture_FromASTObject(mod_ty mod, PyObject *filename)
+_PyFuture_FromAST(mod_ty mod, PyObject *filename)
{
PyFutureFeatures *ff;
@@ -134,18 +134,3 @@ PyFuture_FromASTObject(mod_ty mod, PyObject *filename)
}
return ff;
}
-
-
-PyFutureFeatures *
-PyFuture_FromAST(mod_ty mod, const char *filename_str)
-{
- PyFutureFeatures *ff;
- PyObject *filename;
-
- filename = PyUnicode_DecodeFSDefault(filename_str);
- if (filename == NULL)
- return NULL;
- ff = PyFuture_FromASTObject(mod, filename);
- Py_DECREF(filename);
- return ff;
-}