diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-19 22:55:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-19 22:55:23 (GMT) |
commit | a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547 (patch) | |
tree | be5628b6a936b27c41b6343d9ceacafeac934ff8 /Python/Python-ast.c | |
parent | 33f0a8578b729e67c482daedc2660648afd0ee78 (diff) | |
download | cpython-a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547.zip cpython-a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547.tar.gz cpython-a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547.tar.bz2 |
gh-105922: Refactor PyRun_InteractiveOneObjectEx() (#105925)
Refactor PyRun_InteractiveOneObjectEx(), _PyRun_SimpleFileObject()
and PyRun_SimpleStringFlags():
* Keep a strong reference to the __main__ module while using its
dictionary (PyModule_GetDict()). Use PyImport_AddModule() with
Py_XNewRef().
* Declare variables closer to where they are defined.
* Rename variables to use name longer than 1 character.
* Add pyrun_one_parse_ast() sub-function.
Diffstat (limited to 'Python/Python-ast.c')
0 files changed, 0 insertions, 0 deletions