diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-01 11:14:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 11:14:41 (GMT) |
commit | dfe884759d1f4441c889695f8985bc9feb9f37eb (patch) | |
tree | 64e8bc65ee86db1bfca6a4a5cda8a7b598614989 /Include/cpython/pylifecycle.h | |
parent | b9f0354efce95b7557bc43ea193c4b652cd28392 (diff) | |
download | cpython-dfe884759d1f4441c889695f8985bc9feb9f37eb.zip cpython-dfe884759d1f4441c889695f8985bc9feb9f37eb.tar.gz cpython-dfe884759d1f4441c889695f8985bc9feb9f37eb.tar.bz2 |
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().
Diffstat (limited to 'Include/cpython/pylifecycle.h')
-rw-r--r-- | Include/cpython/pylifecycle.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index a3fdeef..3bffc80 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -39,7 +39,7 @@ PyAPI_FUNC(_PyInitError) _Py_InitializeMainInterpreter( PyAPI_FUNC(_PyInitError) _Py_InitializeFromConfig( const _PyCoreConfig *config); -PyAPI_FUNC(void) _Py_NO_RETURN _Py_FatalInitError(_PyInitError err); +PyAPI_FUNC(void) _Py_NO_RETURN _Py_ExitInitError(_PyInitError err); /* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level * exit functions. |