summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-08-17 08:30:47 (GMT)
committerGitHub <noreply@github.com>2023-08-17 08:30:47 (GMT)
commit358b1acc69c09d110eecfca8fa6b72cea376c5f7 (patch)
treeebfd7ec96ad82f12ee3190dd404a22bf1a972579 /Doc/whatsnew
parentb8e62cfb01f072cc18d32c23e38b3f1107f19a7f (diff)
downloadcpython-358b1acc69c09d110eecfca8fa6b72cea376c5f7.zip
cpython-358b1acc69c09d110eecfca8fa6b72cea376c5f7.tar.gz
cpython-358b1acc69c09d110eecfca8fa6b72cea376c5f7.tar.bz2
[3.11] gh-107298: Fix some references in the C API documentation (GH-108072) (GH-108076)
(cherry picked from commit f51f0466c07eabc6177c2f64f70c952dada050e8)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.2.rst2
-rw-r--r--Doc/whatsnew/2.3.rst2
-rw-r--r--Doc/whatsnew/2.4.rst2
-rw-r--r--Doc/whatsnew/2.6.rst6
-rw-r--r--Doc/whatsnew/2.7.rst12
-rw-r--r--Doc/whatsnew/3.0.rst2
-rw-r--r--Doc/whatsnew/3.1.rst2
-rw-r--r--Doc/whatsnew/3.2.rst2
8 files changed, 15 insertions, 15 deletions
diff --git a/Doc/whatsnew/2.2.rst b/Doc/whatsnew/2.2.rst
index 44e9bd8..7de48a4 100644
--- a/Doc/whatsnew/2.2.rst
+++ b/Doc/whatsnew/2.2.rst
@@ -1109,7 +1109,7 @@ code, none of the changes described here will affect you very much.
definition tables to simplify implementation of methods with no arguments or a
single untyped argument. Calling such methods is more efficient than calling a
corresponding method that uses :c:macro:`METH_VARARGS`. Also, the old
- :c:macro:`METH_OLDARGS` style of writing C methods is now officially deprecated.
+ :c:macro:`!METH_OLDARGS` style of writing C methods is now officially deprecated.
* Two new wrapper functions, :c:func:`PyOS_snprintf` and :c:func:`PyOS_vsnprintf`
were added to provide cross-platform implementations for the relatively new
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst
index 68a8917..4390f24 100644
--- a/Doc/whatsnew/2.3.rst
+++ b/Doc/whatsnew/2.3.rst
@@ -1886,7 +1886,7 @@ Changes to Python's build process and to the C API include:
(:file:`libpython2.3.so`) by supplying :option:`!--enable-shared` when running
Python's :program:`configure` script. (Contributed by Ondrej Palkovsky.)
-* The :c:macro:`DL_EXPORT` and :c:macro:`DL_IMPORT` macros are now deprecated.
+* The :c:macro:`!DL_EXPORT` and :c:macro:`!DL_IMPORT` macros are now deprecated.
Initialization functions for Python extension modules should now be declared
using the new macro :c:macro:`PyMODINIT_FUNC`, while the Python core will
generally use the :c:macro:`PyAPI_FUNC` and :c:macro:`PyAPI_DATA` macros.
diff --git a/Doc/whatsnew/2.4.rst b/Doc/whatsnew/2.4.rst
index a00c436..4272928 100644
--- a/Doc/whatsnew/2.4.rst
+++ b/Doc/whatsnew/2.4.rst
@@ -1476,7 +1476,7 @@ Some of the changes to Python's build process and to the C API are:
:c:func:`PyArg_ParseTupleAndKeywords` but takes a :c:type:`va_list` instead of a
number of arguments. (Contributed by Greg Chapman.)
-* A new method flag, :c:macro:`METH_COEXISTS`, allows a function defined in slots
+* A new method flag, :c:macro:`METH_COEXIST`, allows a function defined in slots
to co-exist with a :c:type:`PyCFunction` having the same name. This can halve
the access time for a method such as :meth:`set.__contains__`. (Contributed by
Raymond Hettinger.)
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 2b8fa15..563fa46 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -3060,9 +3060,9 @@ Changes to Python's build process and to the C API include:
* Some macros were renamed in both 3.0 and 2.6 to make it clearer that
they are macros,
- not functions. :c:macro:`Py_Size()` became :c:macro:`Py_SIZE()`,
- :c:macro:`Py_Type()` became :c:macro:`Py_TYPE()`, and
- :c:macro:`Py_Refcnt()` became :c:macro:`Py_REFCNT()`.
+ not functions. :c:macro:`!Py_Size()` became :c:macro:`Py_SIZE()`,
+ :c:macro:`!Py_Type()` became :c:macro:`Py_TYPE()`, and
+ :c:macro:`!Py_Refcnt()` became :c:macro:`Py_REFCNT()`.
The mixed-case macros are still available
in Python 2.6 for backward compatibility.
(:issue:`1629`)
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index 09798ca..bc62a21 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -2286,10 +2286,10 @@ object, and then get the ``void *`` pointer, which will usually point
to an array of pointers to the module's various API functions.
There is an existing data type already used for this,
-:c:type:`PyCObject`, but it doesn't provide type safety. Evil code
+:c:type:`!PyCObject`, but it doesn't provide type safety. Evil code
written in pure Python could cause a segmentation fault by taking a
-:c:type:`PyCObject` from module A and somehow substituting it for the
-:c:type:`PyCObject` in module B. Capsules know their own name,
+:c:type:`!PyCObject` from module A and somehow substituting it for the
+:c:type:`!PyCObject` in module B. Capsules know their own name,
and getting the pointer requires providing the name:
.. code-block:: c
@@ -2309,10 +2309,10 @@ detect the mismatched name and return false. Refer to
:ref:`using-capsules` for more information on using these objects.
Python 2.7 now uses capsules internally to provide various
-extension-module APIs, but the :c:func:`PyCObject_AsVoidPtr` was
+extension-module APIs, but the :c:func:`!PyCObject_AsVoidPtr` was
modified to handle capsules, preserving compile-time compatibility
-with the :c:type:`CObject` interface. Use of
-:c:func:`PyCObject_AsVoidPtr` will signal a
+with the :c:type:`!PyCObject` interface. Use of
+:c:func:`!PyCObject_AsVoidPtr` will signal a
:exc:`PendingDeprecationWarning`, which is silent by default.
Implemented in Python 3.1 and backported to 2.7 by Larry Hastings;
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst
index 6f2a155..65fcc07 100644
--- a/Doc/whatsnew/3.0.rst
+++ b/Doc/whatsnew/3.0.rst
@@ -875,7 +875,7 @@ to the C API.
* Renamed the boolean conversion C-level slot and method:
``nb_nonzero`` is now ``nb_bool``.
-* Removed :c:macro:`METH_OLDARGS` and :c:macro:`WITH_CYCLE_GC` from the C API.
+* Removed :c:macro:`!METH_OLDARGS` and :c:macro:`!WITH_CYCLE_GC` from the C API.
.. ======================================================================
diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst
index e4365d4..ceef622 100644
--- a/Doc/whatsnew/3.1.rst
+++ b/Doc/whatsnew/3.1.rst
@@ -510,7 +510,7 @@ Changes to Python's build process and to the C API include:
(Contributed by Mark Dickinson; :issue:`5914`.)
-* Added :c:type:`PyCapsule` as a replacement for the :c:type:`PyCObject` API.
+* Added :c:type:`PyCapsule` as a replacement for the :c:type:`!PyCObject` API.
The principal difference is that the new type has a well defined interface
for passing typing safety information and a less complicated signature
for calling a destructor. The old type had a problematic API and is now
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index 01f5cf5..de355c1 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -2656,7 +2656,7 @@ require changes to your code:
* "t#" format has been removed: use "s#" or "s*" instead
* "w" and "w#" formats has been removed: use "w*" instead
-* The :c:type:`PyCObject` type, deprecated in 3.1, has been removed. To wrap
+* The :c:type:`!PyCObject` type, deprecated in 3.1, has been removed. To wrap
opaque C pointers in Python objects, the :c:type:`PyCapsule` API should be used
instead; the new type has a well-defined interface for passing typing safety
information and a less complicated signature for calling a destructor.