mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634)
The PyArena type is not part of the limited API, so these headers shouldn't be part of it either.
This commit is contained in:
parent
6954be815a
commit
421a72af4d
5 changed files with 9 additions and 4 deletions
|
@ -1339,6 +1339,7 @@ def main(srcfile, dump_module=False):
|
|||
f.write('extern "C" {\n')
|
||||
f.write('#endif\n')
|
||||
f.write('\n')
|
||||
f.write('#ifndef Py_LIMITED_API\n')
|
||||
f.write('#include "asdl.h"\n')
|
||||
f.write('\n')
|
||||
f.write('#undef Yield /* undefine macro conflicting with <winbase.h> */\n')
|
||||
|
@ -1353,6 +1354,7 @@ def main(srcfile, dump_module=False):
|
|||
f.write("PyObject* PyAST_mod2obj(mod_ty t);\n")
|
||||
f.write("mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);\n")
|
||||
f.write("int PyAST_Check(PyObject* obj);\n")
|
||||
f.write("#endif /* !Py_LIMITED_API */\n")
|
||||
f.write('\n')
|
||||
f.write('#ifdef __cplusplus\n')
|
||||
f.write('}\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue