summaryrefslogtreecommitdiff
path: root/Doc/c-api/intro.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-11-06 13:01:15 -0800
committerBenjamin Peterson <benjamin@python.org>2016-11-06 13:01:15 -0800
commit1bcaf3a5f3cef733a03bd15dc30d60289959402b (patch)
treed606b56c2f0628b12e0b5a954f782689955de594 /Doc/c-api/intro.rst
parent4abfe80e5524cebcb6c493f7a67f2c2587715a69 (diff)
parentbc82b552cc77e925e85c96b70df3bf3cafda1565 (diff)
downloadcpython-1bcaf3a5f3cef733a03bd15dc30d60289959402b.tar.gz
merge 3.5
Diffstat (limited to 'Doc/c-api/intro.rst')
-rw-r--r--Doc/c-api/intro.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst
index bc3a752132..74681d2c85 100644
--- a/Doc/c-api/intro.rst
+++ b/Doc/c-api/intro.rst
@@ -64,9 +64,10 @@ The header files are typically installed with Python. On Unix, these are
located in the directories :file:`{prefix}/include/pythonversion/` and
:file:`{exec_prefix}/include/pythonversion/`, where :envvar:`prefix` and
:envvar:`exec_prefix` are defined by the corresponding parameters to Python's
-:program:`configure` script and *version* is ``sys.version[:3]``. On Windows,
-the headers are installed in :file:`{prefix}/include`, where :envvar:`prefix` is
-the installation directory specified to the installer.
+:program:`configure` script and *version* is
+``'%d.%d' % sys.version_info[:2]``. On Windows, the headers are installed
+in :file:`{prefix}/include`, where :envvar:`prefix` is the installation
+directory specified to the installer.
To include the headers, place both directories (if different) on your compiler's
search path for includes. Do *not* place the parent directories on the search
@@ -578,9 +579,9 @@ Sometimes, it is desirable to "uninitialize" Python. For instance, the
application may want to start over (make another call to
:c:func:`Py_Initialize`) or the application is simply done with its use of
Python and wants to free memory allocated by Python. This can be accomplished
-by calling :c:func:`Py_Finalize`. The function :c:func:`Py_IsInitialized` returns
+by calling :c:func:`Py_FinalizeEx`. The function :c:func:`Py_IsInitialized` returns
true if Python is currently in the initialized state. More information about
-these functions is given in a later chapter. Notice that :c:func:`Py_Finalize`
+these functions is given in a later chapter. Notice that :c:func:`Py_FinalizeEx`
does *not* free all memory allocated by the Python interpreter, e.g. memory
allocated by extension modules currently cannot be released.