diff options
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 85d96a3..6b31ffd8 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -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') |