]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107298: Fix a few more refs in the C API docs (GH-108361)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 23 Aug 2023 17:12:42 +0000 (20:12 +0300)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 17:12:42 +0000 (20:12 +0300)
gh-107298: Fix few more refs in the C API docs

Doc/c-api/typeobj.rst
Doc/whatsnew/2.6.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.7.rst
Misc/NEWS.d/3.11.0b1.rst
Misc/NEWS.d/3.7.0a4.rst
Misc/NEWS.d/3.8.0a4.rst

index cd037b4de882e16a99a55169f38b2056da2457f8..acaf0eced35b3ff4b9adc22fd8e6657fca52464b 100644 (file)
@@ -1403,7 +1403,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
        are allowed to be removed even if the instance is still alive).
 
    Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to
-   :c:func:`local_traverse` to have these specific names; don't name them just
+   :c:func:`!local_traverse` to have these specific names; don't name them just
    anything.
 
    Instances of :ref:`heap-allocated types <heap-types>` hold a reference to
index 8b3d3a324f68f670baea23125051e69b73211c74..beba4428e67c3f75b7e2af74d64301b53e0ae67b 100644 (file)
@@ -121,7 +121,7 @@ about features that will be removed in Python 3.0.  You can run code
 with this switch to see how much work will be necessary to port
 code to 3.0.  The value of this switch is available
 to Python code as the boolean variable :data:`sys.py3kwarning`,
-and to C extension code as :c:data:`Py_Py3kWarningFlag`.
+and to C extension code as :c:data:`!Py_Py3kWarningFlag`.
 
 .. seealso::
 
index 37e2d04d516ab0a38a91fa3c19e5cec976cd5af9..e82e8e4db1abcd5dc514466aea37ced6c9f8baad 100644 (file)
@@ -2155,13 +2155,13 @@ Changes to Python's build process and to the C API include:
   :c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions
   are now deprecated.
 
-* New function: :c:func:`PySys_SetArgvEx` sets the value of
+* New function: :c:func:`!PySys_SetArgvEx` sets the value of
   ``sys.argv`` and can optionally update ``sys.path`` to include the
   directory containing the script named by ``sys.argv[0]`` depending
   on the value of an *updatepath* parameter.
 
   This function was added to close a security hole for applications
-  that embed Python.  The old function, :c:func:`PySys_SetArgv`, would
+  that embed Python.  The old function, :c:func:`!PySys_SetArgv`, would
   always update ``sys.path``, and sometimes it would add the current
   directory.  This meant that, if you ran an application embedding
   Python in a directory controlled by someone else, attackers could
@@ -2169,8 +2169,8 @@ Changes to Python's build process and to the C API include:
   :file:`os.py`) that your application would then import and run.
 
   If you maintain a C/C++ application that embeds Python, check
-  whether you're calling :c:func:`PySys_SetArgv` and carefully consider
-  whether the application should be using :c:func:`PySys_SetArgvEx`
+  whether you're calling :c:func:`!PySys_SetArgv` and carefully consider
+  whether the application should be using :c:func:`!PySys_SetArgvEx`
   with *updatepath* set to false.
 
   Security issue reported as `CVE-2008-5983
@@ -2545,11 +2545,11 @@ For C extensions:
 
 For applications that embed Python:
 
-* The :c:func:`PySys_SetArgvEx` function was added, letting
+* The :c:func:`!PySys_SetArgvEx` function was added, letting
   applications close a security hole when the existing
-  :c:func:`PySys_SetArgv` function was used.  Check whether you're
-  calling :c:func:`PySys_SetArgv` and carefully consider whether the
-  application should be using :c:func:`PySys_SetArgvEx` with
+  :c:func:`!PySys_SetArgv` function was used.  Check whether you're
+  calling :c:func:`!PySys_SetArgv` and carefully consider whether the
+  application should be using :c:func:`!PySys_SetArgvEx` with
   *updatepath* set to false.
 
 .. ======================================================================
index 794271f3c32b89296dbc1c4a16a487bb8217a000..a36e9fa852723abf0e81186aad7d1812cae5b66d 100644 (file)
@@ -1891,7 +1891,7 @@ Other Build and C API Changes
   allowing retrieval of function pointers from named type slots when using
   the limited API.  (Contributed by Martin von Löwis in :issue:`17162`.)
 
-* The new :c:func:`Py_SetStandardStreamEncoding` pre-initialization API
+* The new :c:func:`!Py_SetStandardStreamEncoding` pre-initialization API
   allows applications embedding the CPython interpreter to reliably force
   a particular encoding and error handler for the standard streams.
   (Contributed by Bastien Montagne and Nick Coghlan in :issue:`16129`.)
index 218a37cd264c7cca3756725e853bbb274a749fec..eb083737b0b7ed244d5577653eb891158bd4d448 100644 (file)
@@ -2495,12 +2495,12 @@ either in embedding applications, or in CPython itself.
 :issue:`22257`, and further updated by Nick, Eric, and Victor Stinner in a
 number of other issues). Some known details affected:
 
-* :c:func:`PySys_AddWarnOptionUnicode` is not currently usable by embedding
+* :c:func:`!PySys_AddWarnOptionUnicode` is not currently usable by embedding
   applications due to the requirement to create a Unicode object prior to
-  calling ``Py_Initialize``. Use :c:func:`PySys_AddWarnOption` instead.
+  calling ``Py_Initialize``. Use :c:func:`!PySys_AddWarnOption` instead.
 
 * warnings filters added by an embedding application with
-  :c:func:`PySys_AddWarnOption` should now more consistently take precedence
+  :c:func:`!PySys_AddWarnOption` should now more consistently take precedence
   over the default filters set by the interpreter
 
 Due to changes in the way the default warnings filters are configured,
index 766ada4f8e1176198a0f66c7f414781b92fd0e2a..2bcccc7dae3734b1dc34fd1dc62ae847225e81ad 100644 (file)
@@ -2028,8 +2028,8 @@ https://gitlab.com/warsaw/pynche
 .. nonce: 3mQ54t
 .. section: C API
 
-Deprecate the C functions: :c:func:`PySys_SetArgv`,
-:c:func:`PySys_SetArgvEx`, :c:func:`PySys_SetPath`. Patch by Victor Stinner.
+Deprecate the C functions: :c:func:`!PySys_SetArgv`,
+:c:func:`!PySys_SetArgvEx`, :c:func:`!PySys_SetPath`. Patch by Victor Stinner.
 
 ..
 
index f19d1a1823584b5dc24f12ca428e688f69804210..ebae046a7a6ba043314afa51985e5db981c97efc 100644 (file)
@@ -842,5 +842,5 @@ Moved the pygetopt.h header into internal/, since it has no public APIs.
 .. nonce: LbyQt6
 .. section: C API
 
-:c:func:`Py_SetProgramName` and :c:func:`Py_SetPythonHome` now take the
+:c:func:`!Py_SetProgramName` and :c:func:`!Py_SetPythonHome` now take the
 ``const wchar *`` arguments instead of ``wchar *``.
index 2ce60f39539e8c4bf8ab5f0305e9db23a7159d93..da03d93eae3965412ea8dfb6dea33075d4edba07 100644 (file)
@@ -1344,7 +1344,7 @@ Fix the argument handling in Tools/scripts/lll.py.
 .. nonce: vghb86
 .. section: C API
 
-Fix memory leak in :c:func:`Py_SetStandardStreamEncoding`: release memory if
+Fix memory leak in :c:func:`!Py_SetStandardStreamEncoding`: release memory if
 the function is called twice.
 
 ..