10000 gh-107298: Fix a few more refs in the C API docs (GH-108361) · python/cpython@422f81b · GitHub
[go: up one dir, main page]

Skip to content

Commit 422f81b

Browse files
gh-107298: Fix a few more refs in the C API docs (GH-108361)
gh-107298: Fix few more refs in the C API docs
1 parent 2135bcd commit 422f81b

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
14031403
are allowed to be removed even if the instance is still alive).
14041404

14051405
Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to
1406-
:c:func:`local_traverse` to have these specific names; don't name them just
1406+
:c:func:`!local_traverse` to have these specific names; don't name them just
14071407
anything.
14081408

14091409
Instances of :ref:`heap-allocated types <heap-types>` hold a reference to

Doc/whatsnew/2.6.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ about features that will be removed in Python 3.0. You can run code
121121
with this switch to see how much work will be necessary to port
122122
code to 3.0. The value of this switch is available
123123
to Python code as the boolean variable :data:`sys.py3kwarning`,
124-
and to C extension code as :c:data:`Py_Py3kWarningFlag`.
124+
and to C extension code as :c:data:`!Py_Py3kWarningFlag`.
125125

126126
.. seealso::
127127

Doc/whatsnew/2.7.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,22 +2155,22 @@ Changes to Python's build process and to the C API include:
21552155
:c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions
21562156
are now deprecated.
21572157

2158-
* New function: :c:func:`PySys_SetArgvEx` sets the value of
2158+
* New function: :c:func:`!PySys_SetArgvEx` sets the value of
21592159
``sys.argv`` and can optionally update ``sys.path`` to include the
21602160
directory containing the script named by ``sys.argv[0]`` depending
21612161
on the value of an *updatepath* parameter.
21622162

21632163
This function was added to close a security hole for applications
2164-
that embed Python. The old function, :c:func:`PySys_SetArgv`, would
2164+
that embed Python. The old function, :c:func:`!PySys_SetArgv`, would
21652165
always update ``sys.path``, and sometimes it would add the current
21662166
directory. This meant that, if you ran an application embedding
21672167
Python in a directory controlled by someone else, attackers could
21682168
put a Trojan-horse module in the directory (say, a file named
21692169
:file:`os.py`) that your application would then import and run.
21702170

21712171
If you maintain a C/C++ application that embeds Python, check
2172-
whether you're calling :c:func:`PySys_SetArgv` and carefully consider
2173-
whether the application should be using :c:func:`PySys_SetArgvEx`
2172+
whether you're calling :c:func:`!PySys_SetArgv` and carefully consider
2173+
whether the application should be using :c:func:`!PySys_SetArgvEx`
21742174
with *updatepath* set to false.
21752175

21762176
Security issue reported as `CVE-2008-5983
@@ -2545,11 +2545,11 @@ For C extensions:
25452545

25462546
For applications that embed Python:
25472547

2548-
* The :c:func:`PySys_SetArgvEx` function was added, letting
2548+
* The :c:func:`!PySys_SetArgvEx` function was added, letting
25492549
applications close a security hole when the existing
2550-
:c:func:`PySys_SetArgv` function was used. Check whether you're
2551-
calling :c:func:`PySys_SetArgv` and carefully consider whether the
2552-
application should be using :c:func:`PySys_SetArgvEx` with
2550+
:c:func:`!PySys_SetArgv` function was used. Check whether you're
2551+
calling :c:func:`!PySys_SetArgv` and carefully consider whether the
2552+
application should be using :c:func:`!PySys_SetArgvEx` with
25532553
*updatepath* set to false.
25542554

25552555
.. ======================================================================

Doc/whatsnew/3.4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ Other Build and C API Changes
18911891
allowing retrieval of function pointers from named type slots when using
18921892
the limited API. (Contributed by Martin von Löwis in :issue:`17162`.)
18931893

1894-
* The new :c:func:`Py_SetStandardStreamEncoding` pre-initialization API
1894+
* The new :c:func:`!Py_SetStandardStreamEncoding` pre-initialization API
18951895
allows applications embedding the CPython interpreter to reliably force
18961896
a particular encoding and error handler for the standard streams.
18971897
(Contributed by Bastien Montagne and Nick Coghlan in :issue:`16129`.)

Doc/whatsnew/3.7.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,12 +2495,12 @@ either in embedding applications, or in CPython itself.
24952495
:issue:`22257`, and further updated by Nick, Eric, and Victor Stinner in a
24962496
number of other issues). Some known details affected:
24972497

2498-
* :c:func:`PySys_AddWarnOptionUnicode` is not currently usable by embedding
2498+
* :c:func:`!PySys_AddWarnOptionUnicode` is not currently usable by embedding
24992499
applications due to the requirement to create a Unicode object prior to
2500-
calling ``Py_Initialize``. Use :c:func:`PySys_AddWarnOption` instead.
2500+
calling ``Py_Initialize``. Use :c:func:`!PySys_AddWarnOption` instead.
25012501

25022502
* warnings filters added by an embedding application with
2503-
:c:func:`PySys_AddWarnOption` should now more consistently take precedence
2503+
:c:func:`!PySys_AddWarnOption` should now more consistently take precedence
25042504
over the default filters set by the interpreter
25052505

25062506
Due to changes in the way the default warnings filters are configured,

Misc/NEWS.d/3.11.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,8 +2028,8 @@ https://gitlab.com/warsaw/pynche
20282028
.. nonce: 3mQ54t
20292029
.. section: C API
20302030
2031-
Deprecate the C functions: :c:func:`PySys_SetArgv`,
2032-
:c:func:`PySys_SetArgvEx`, :c:func:`PySys_SetPath`. Patch by Victor Stinner.
2031+
Deprecate the C functions: :c:func:`!PySys_SetArgv`,
2032+
:c:func:`!PySys_SetArgvEx`, :c:func:`!PySys_SetPath`. Patch by Victor Stinner.
20332033

20342034
..
20352035

Misc/NEWS.d/3.7.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,5 +842,5 @@ Moved the pygetopt.h header into internal/, since it has no public APIs.
842842
.. nonce: LbyQt6
843843
.. section: C API
844844
845-
:c:func:`Py_SetProgramName` and :c:func:`Py_SetPythonHome` now take the
845+
:c:func:`!Py_SetProgramName` and :c:func:`!Py_SetPythonHome` now take the
846846
``const wchar *`` arguments instead of ``wchar *``.

Misc/NEWS.d/3.8.0a4.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ Fix the argument handling in Tools/scripts/lll.py.
13441344
.. nonce: vghb86
13451345
.. section: C API
13461346
1347-
Fix memory leak in :c:func:`Py_SetStandardStreamEncoding`: release memory if
1347+
Fix memory leak in :c:func:`!Py_SetStandardStreamEncoding`: release memory if
13481348
the function is called twice.
13491349

13501350
..

0 commit comments

Comments
 (0)
0