summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-26 11:05:47 (GMT)
committerGitHub <noreply@github.com>2019-04-26 11:05:47 (GMT)
commit4cb525a1f0cba152d1da61e531f2ad5db633120a (patch)
tree1f1763445e6150950986d8ba8e24181375124a7a /Python/pylifecycle.c
parent00db7c73af4f60df61e9df87cde7401c3ed9df69 (diff)
downloadcpython-4cb525a1f0cba152d1da61e531f2ad5db633120a.zip
cpython-4cb525a1f0cba152d1da61e531f2ad5db633120a.tar.gz
cpython-4cb525a1f0cba152d1da61e531f2ad5db633120a.tar.bz2
bpo-36356: pymain_exit_error() only call pymain_free() for exit (GH-12968)
Add _Py_INIT_HAS_EXITCODE() macro.
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c2
1 files changed, 1 insertions, 1 deletions
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 @@ Py_FatalError(const char *msg)
void _Py_NO_RETURN
_Py_ExitInitError(_PyInitError err)
{
- if (err.exitcode >= 0) {
+ if (_Py_INIT_HAS_EXITCODE(err)) {
exit(err.exitcode);
}
else {