summaryrefslogtreecommitdiffstats
path: root/Modules/main.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-01 03:35:33 (GMT)
committerGitHub <noreply@github.com>2019-05-01 03:35:33 (GMT)
commitdb7197543112954b0912e3d46e39fefcb1c3b950 (patch)
tree0c82232775c6b1a03671054f9e70f2bb99e6adc9 /Modules/main.c
parentc4e671eec20dfcb29b18596a89ef075f826c9f96 (diff)
downloadcpython-db7197543112954b0912e3d46e39fefcb1c3b950.zip
cpython-db7197543112954b0912e3d46e39fefcb1c3b950.tar.gz
cpython-db7197543112954b0912e3d46e39fefcb1c3b950.tar.bz2
bpo-36763: Rework _PyInitError API (GH-13031)
* Remove _PyInitError.user_err field and _Py_INIT_USER_ERR() macro: use _Py_INIT_ERR() instead. _Py_ExitInitError() now longer calls abort() on error: exit with exit code 1 instead. * Add _PyInitError._type private field. * exitcode field type is now unsigned int on Windows. * Rename prefix field to _func. * Rename msg field to err_msg.
Diffstat (limited to 'Modules/main.c')
-rw-r--r--Modules/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 68f0b99..575683c 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -570,7 +570,7 @@ exit_sigint(void)
static void _Py_NO_RETURN
pymain_exit_error(_PyInitError err)
{
- if (_Py_INIT_HAS_EXITCODE(err)) {
+ if (_Py_INIT_IS_EXIT(err)) {
/* If it's an error rather than a regular exit, leave Python runtime
alive: _Py_ExitInitError() uses the current exception and use
sys.stdout in this case. */