]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36142: Rework error reporting in pymain_main() (GH-12113)
authorVictor Stinner <vstinner@redhat.com>
Fri, 1 Mar 2019 11:14:41 +0000 (12:14 +0100)
committerGitHub <noreply@github.com>
Fri, 1 Mar 2019 11:14:41 +0000 (12:14 +0100)
commitdfe884759d1f4441c889695f8985bc9feb9f37eb
tree64e8bc65ee86db1bfca6a4a5cda8a7b598614989
parentb9f0354efce95b7557bc43ea193c4b652cd28392
bpo-36142: Rework error reporting in pymain_main() (GH-12113)

Add a new _Py_INIT_EXIT() macro to be able to exit Python with an
exitcode using _PyInitError API. Rewrite function calls by
pymain_main() to use _PyInitError.

Changes:

* Remove _PyMain.err and _PyMain.status field
* Add _Py_INIT_EXIT() macro and _PyInitError.exitcode field.
* Rename _Py_FatalInitError() to _Py_ExitInitError().
Include/cpython/coreconfig.h
Include/cpython/pylifecycle.h
Modules/main.c
Programs/_freeze_importlib.c
Programs/_testembed.c
Python/frozenmain.c
Python/pathconfig.c
Python/pylifecycle.c