mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020)
PyAST_obj2mod_ex() is similar to PyAST_obj2mod() with an additional 'feature_version' parameter which is unused.
This commit is contained in:
parent
8725c83ed5
commit
022ac0a497
1
Include/Python-ast.h
generated
1
Include/Python-ast.h
generated
|
@ -707,7 +707,6 @@ type_ignore_ty _Py_TypeIgnore(int lineno, string tag, PyArena *arena);
|
||||||
|
|
||||||
PyObject* PyAST_mod2obj(mod_ty t);
|
PyObject* PyAST_mod2obj(mod_ty t);
|
||||||
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
|
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
|
||||||
mod_ty PyAST_obj2mod_ex(PyObject* ast, PyArena* arena, int mode, int feature_version);
|
|
||||||
int PyAST_Check(PyObject* obj);
|
int PyAST_Check(PyObject* obj);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1190,11 +1190,6 @@ class PartingShots(StaticVisitor):
|
||||||
|
|
||||||
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
|
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
|
||||||
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
|
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
|
||||||
{
|
|
||||||
return PyAST_obj2mod_ex(ast, arena, mode, PY_MINOR_VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
mod_ty PyAST_obj2mod_ex(PyObject* ast, PyArena* arena, int mode, int feature_version)
|
|
||||||
{
|
{
|
||||||
mod_ty res;
|
mod_ty res;
|
||||||
PyObject *req_type[3];
|
PyObject *req_type[3];
|
||||||
|
@ -1280,7 +1275,6 @@ def main(srcfile, dump_module=False):
|
||||||
f.write("\n")
|
f.write("\n")
|
||||||
f.write("PyObject* PyAST_mod2obj(mod_ty t);\n")
|
f.write("PyObject* PyAST_mod2obj(mod_ty t);\n")
|
||||||
f.write("mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);\n")
|
f.write("mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);\n")
|
||||||
f.write("mod_ty PyAST_obj2mod_ex(PyObject* ast, PyArena* arena, int mode, int feature_version);\n")
|
|
||||||
f.write("int PyAST_Check(PyObject* obj);\n")
|
f.write("int PyAST_Check(PyObject* obj);\n")
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
f.write('#ifdef __cplusplus\n')
|
f.write('#ifdef __cplusplus\n')
|
||||||
|
|
5
Python/Python-ast.c
generated
5
Python/Python-ast.c
generated
|
@ -8990,11 +8990,6 @@ PyObject* PyAST_mod2obj(mod_ty t)
|
||||||
|
|
||||||
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
|
/* mode is 0 for "exec", 1 for "eval" and 2 for "single" input */
|
||||||
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
|
mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode)
|
||||||
{
|
|
||||||
return PyAST_obj2mod_ex(ast, arena, mode, PY_MINOR_VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
mod_ty PyAST_obj2mod_ex(PyObject* ast, PyArena* arena, int mode, int feature_version)
|
|
||||||
{
|
{
|
||||||
mod_ty res;
|
mod_ty res;
|
||||||
PyObject *req_type[3];
|
PyObject *req_type[3];
|
||||||
|
|
Loading…
Reference in a new issue