SIGN IN SIGN UP

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.
V
Victor Stinner committed
a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547
Parent: 33f0a85
Committed by GitHub <noreply@github.com> on 6/19/2023, 10:55:23 PM