summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-05-15 06:49:29 (GMT)
committerGeorg Brandl <georg@python.org>2011-05-15 06:49:29 (GMT)
commit318e62153baf1162130fb85e06caf64bbd5a7916 (patch)
treed948675e238b4b285211d6fde0903906aaa1b64a
parent760155cc52e182f759498e780d799604e70f04a0 (diff)
parent0b2489e986dd8fa3c58c242dd30559fce5135aaa (diff)
downloadcpython-318e62153baf1162130fb85e06caf64bbd5a7916.zip
cpython-318e62153baf1162130fb85e06caf64bbd5a7916.tar.gz
cpython-318e62153baf1162130fb85e06caf64bbd5a7916.tar.bz2
Merge #6498 fix from 3.1.
-rw-r--r--Doc/c-api/veryhigh.rst11
-rw-r--r--Python/pythonrun.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index 26e0716..8bece6d 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -34,11 +34,12 @@ the same library that the Python runtime is using.
according to the user's locale). It is important to note that the
argument list may be modified (but the contents of the strings
pointed to by the argument list are not). The return value will be
- the integer passed to the :func:`sys.exit` function, ``1`` if the
- interpreter exits due to an exception, or ``2`` if the parameter
- list does not represent a valid Python command line.
+ ```0``` if the interpreter exits normally (ie, without an
+ exception), ``1`` if the interpreter exits due to an exception, or
+ ``2`` if the parameter list does not represent a valid Python
+ command line.
- Note that if an otherwise unhandled :exc:`SystemError` is raised, this
+ Note that if an otherwise unhandled :exc:`SystemExit` is raised, this
function will not return ``1``, but exit the process, as long as
``Py_InspectFlag`` is not set.
@@ -85,7 +86,7 @@ the same library that the Python runtime is using.
there was an error, there is no way to get the exception information. For the
meaning of *flags*, see below.
- Note that if an otherwise unhandled :exc:`SystemError` is raised, this
+ Note that if an otherwise unhandled :exc:`SystemExit` is raised, this
function will not return ``-1``, but exit the process, as long as
``Py_InspectFlag`` is not set.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 1e2dd58..084db12 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -80,7 +80,7 @@ int Py_DebugFlag; /* Needed by parser.c */
int Py_VerboseFlag; /* Needed by import.c */
int Py_QuietFlag; /* Needed by sysmodule.c */
int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
-int Py_InspectFlag; /* Needed to determine whether to exit at SystemError */
+int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
int Py_NoSiteFlag; /* Suppress 'import site' */
int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */