commit | 4cb525a1f0cba152d1da61e531f2ad5db633120a | [log] [tgz] |
---|---|---|
author | Victor Stinner <vstinner@redhat.com> | Fri Apr 26 13:05:47 2019 +0200 |
committer | GitHub <noreply@github.com> | Fri Apr 26 13:05:47 2019 +0200 |
tree | 1f1763445e6150950986d8ba8e24181375124a7a | |
parent | 00db7c73af4f60df61e9df87cde7401c3ed9df69 [diff] [blame] |
bpo-36356: pymain_exit_error() only call pymain_free() for exit (GH-12968) Add _Py_INIT_HAS_EXITCODE() macro.
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index ae2d0bf..d93fe06 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c
@@ -2172,7 +2172,7 @@ void _Py_NO_RETURN _Py_ExitInitError(_PyInitError err) { - if (err.exitcode >= 0) { + if (_Py_INIT_HAS_EXITCODE(err)) { exit(err.exitcode); } else {