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
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::
: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
: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
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.
.. ======================================================================
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`.)
: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,
.. 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.
..
.. 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 *``.
.. 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.
..