summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-17 21:05:29 (GMT)
committerGitHub <noreply@github.com>2019-05-17 21:05:29 (GMT)
commit12083284c54be25abadd85781d36b63731dc1f0c (patch)
tree5fdc2c6a606cd0d166562db7a07f96f3ae601e74 /Include
parentbcfbbd704646622e919c1306a91fba61d603483d (diff)
downloadcpython-12083284c54be25abadd85781d36b63731dc1f0c.zip
cpython-12083284c54be25abadd85781d36b63731dc1f0c.tar.gz
cpython-12083284c54be25abadd85781d36b63731dc1f0c.tar.bz2
bpo-36763: _Py_RunMain() doesn't call Py_Exit() anymore (GH-13390)
Py_Main() and _Py_RunMain() now return the exitcode rather than calling Py_Exit(exitcode) when calling PyErr_Print() if the current exception type is SystemExit. * Add _Py_HandleSystemExit(). * Add pymain_exit_err_print(). * Add pymain_exit_print().
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_pylifecycle.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h
index 0d83acd..4684ebe 100644
--- a/Include/internal/pycore_pylifecycle.h
+++ b/Include/internal/pycore_pylifecycle.h
@@ -100,6 +100,8 @@ PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromCoreConfig(
const _PyCoreConfig *coreconfig,
const _PyArgv *args);
+PyAPI_FUNC(int) _Py_HandleSystemExit(int *exitcode_p);
+
#ifdef __cplusplus
}
#endif