summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-21 07:52:07 (GMT)
committerGitHub <noreply@github.com>2023-07-21 07:52:07 (GMT)
commitfcc816dbff7ca66c26f57a506e4d2330fe41d0ff (patch)
tree98cc80573f16950153790ddbd7d017374d439d10 /Misc
parent81861fd90b4ae981e7881cd03a3c370713063525 (diff)
downloadcpython-fcc816dbff7ca66c26f57a506e4d2330fe41d0ff.zip
cpython-fcc816dbff7ca66c26f57a506e4d2330fe41d0ff.tar.gz
cpython-fcc816dbff7ca66c26f57a506e4d2330fe41d0ff.tar.bz2
gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/3.10.0a3.rst2
-rw-r--r--Misc/NEWS.d/3.10.0b1.rst8
-rw-r--r--Misc/NEWS.d/3.11.0a1.rst8
-rw-r--r--Misc/NEWS.d/3.11.0a7.rst2
-rw-r--r--Misc/NEWS.d/3.12.0a1.rst10
-rw-r--r--Misc/NEWS.d/3.12.0a2.rst2
-rw-r--r--Misc/NEWS.d/3.6.0a1.rst2
-rw-r--r--Misc/NEWS.d/3.9.0a1.rst2
8 files changed, 18 insertions, 18 deletions
diff --git a/Misc/NEWS.d/3.10.0a3.rst b/Misc/NEWS.d/3.10.0a3.rst
index f24b6d4..755109c 100644
--- a/Misc/NEWS.d/3.10.0a3.rst
+++ b/Misc/NEWS.d/3.10.0a3.rst
@@ -1466,7 +1466,7 @@ success. Patch by Victor Stinner.
.. nonce: S3FWTP
.. section: C API
-The :c:data:`METH_FASTCALL` calling convention is added to the limited API.
+The :c:macro:`METH_FASTCALL` calling convention is added to the limited API.
The functions :c:func:`PyModule_AddType`,
:c:func:`PyType_FromModuleAndSpec`, :c:func:`PyType_GetModule` and
:c:func:`PyType_GetModuleState` are added to the limited API on Windows.
diff --git a/Misc/NEWS.d/3.10.0b1.rst b/Misc/NEWS.d/3.10.0b1.rst
index f29fc663..38e0af1 100644
--- a/Misc/NEWS.d/3.10.0b1.rst
+++ b/Misc/NEWS.d/3.10.0b1.rst
@@ -1375,8 +1375,8 @@ Add "Annotations Best Practices" document as a new HOWTO.
.. nonce: K5aSl1
.. section: Documentation
-Document the new :const:`Py_TPFLAGS_MAPPING` and
-:const:`Py_TPFLAGS_SEQUENCE` type flags.
+Document the new :c:macro:`Py_TPFLAGS_MAPPING` and
+:c:macro:`Py_TPFLAGS_SEQUENCE` type flags.
..
@@ -1711,7 +1711,7 @@ IDLE's shell now shows prompts in a separate side-bar.
.. nonce: wvWt23
.. section: C API
-Add a new :c:data:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow
+Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow
creating type instances. Patch by Victor Stinner.
..
@@ -1759,7 +1759,7 @@ module.
.. nonce: Co3YhZ
.. section: C API
-Introduce :const:`Py_TPFLAGS_IMMUTABLETYPE` flag for immutable type objects,
+Introduce :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag for immutable type objects,
and modify :c:func:`PyType_Ready` to set it for static types. Patch by
Erlend E. Aasland.
diff --git a/Misc/NEWS.d/3.11.0a1.rst b/Misc/NEWS.d/3.11.0a1.rst
index 2f40252..1a2d22b 100644
--- a/Misc/NEWS.d/3.11.0a1.rst
+++ b/Misc/NEWS.d/3.11.0a1.rst
@@ -888,7 +888,7 @@ zlib.decompress on input data that expands that large.
.. nonce: YHuV_s
.. section: Core and Builtins
-Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit
+Heap types with the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit
the :pep:`590` vectorcall protocol. Previously, this was only possible for
:ref:`static types <static-types>`. Patch by Erlend E. Aasland.
@@ -2575,7 +2575,7 @@ E. Aasland.
.. nonce: bamAGF
.. section: Library
-Set the proper :const:`Py_TPFLAGS_MAPPING` and :const:`Py_TPFLAGS_SEQUENCE`
+Set the proper :c:macro:`Py_TPFLAGS_MAPPING` and :c:macro:`Py_TPFLAGS_SEQUENCE`
flags for subclasses created before a parent has been registered as a
:class:`collections.abc.Mapping` or :class:`collections.abc.Sequence`.
@@ -2693,7 +2693,7 @@ libgcc_s.so file (ex: EMFILE error). Patch by Victor Stinner.
.. section: Library
The _thread.RLock type now fully implement the GC protocol: add a traverse
-function and the :const:`Py_TPFLAGS_HAVE_GC` flag. Patch by Victor Stinner.
+function and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag. Patch by Victor Stinner.
..
@@ -5014,7 +5014,7 @@ must now be used to set an object type and size. Patch by Victor Stinner.
.. section: C API
The :c:func:`PyType_Ready` function now raises an error if a type is defined
-with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function
+with the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function
(:c:member:`PyTypeObject.tp_traverse`). Patch by Victor Stinner.
..
diff --git a/Misc/NEWS.d/3.11.0a7.rst b/Misc/NEWS.d/3.11.0a7.rst
index d3e59a2..94c15f1 100644
--- a/Misc/NEWS.d/3.11.0a7.rst
+++ b/Misc/NEWS.d/3.11.0a7.rst
@@ -275,7 +275,7 @@ initializing to ``list_extend``. Patch by Jeremiah Pascual.
.. nonce: cnaIK3
.. section: Core and Builtins
-Speed up throwing exception in generator with :const:`METH_FASTCALL` calling
+Speed up throwing exception in generator with :c:macro:`METH_FASTCALL` calling
convention. Patch by Kumar Aditya.
..
diff --git a/Misc/NEWS.d/3.12.0a1.rst b/Misc/NEWS.d/3.12.0a1.rst
index d706343..0609270 100644
--- a/Misc/NEWS.d/3.12.0a1.rst
+++ b/Misc/NEWS.d/3.12.0a1.rst
@@ -5856,8 +5856,8 @@ Configuration for the :ref:`integer string conversion length limitation
Extensions classes that set ``tp_dictoffset`` and ``tp_weaklistoffset`` lose
the support for multiple inheritance, but are now safe. Extension classes
-should use :const:`Py_TPFLAGS_MANAGED_DICT` and
-:const:`Py_TPFLAGS_MANAGED_WEAKREF` instead.
+should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and
+:c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead.
..
@@ -5898,7 +5898,7 @@ Support C extensions using managed dictionaries by setting the
.. nonce: QoDHEu
.. section: C API
-API for implementing vectorcall (:c:data:`Py_TPFLAGS_HAVE_VECTORCALL`,
+API for implementing vectorcall (:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`,
:c:func:`PyVectorcall_NARGS` and :c:func:`PyVectorcall_Call`) was added to
the limited API and stable ABI.
@@ -5920,12 +5920,12 @@ Philip Georgi.
.. nonce: -DdGEy
.. section: C API
-The :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class
+The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class
when the class's :py:meth:`~object.__call__` method is reassigned. This
makes vectorcall safe to use with mutable types (i.e. heap types without the
:const:`immutable <Py_TPFLAGS_IMMUTABLETYPE>` flag). Mutable types that do
not override :c:member:`~PyTypeObject.tp_call` now inherit the
-:const:`Py_TPFLAGS_HAVE_VECTORCALL` flag.
+:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag.
..
diff --git a/Misc/NEWS.d/3.12.0a2.rst b/Misc/NEWS.d/3.12.0a2.rst
index d871384..5a3ccab 100644
--- a/Misc/NEWS.d/3.12.0a2.rst
+++ b/Misc/NEWS.d/3.12.0a2.rst
@@ -279,7 +279,7 @@ Fix source locations of :keyword:`match` sub-patterns.
Added the methods :c:func:`PyObject_Vectorcall` and
:c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` along
-with the auxiliary macro constant :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`.
+with the auxiliary macro constant :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`.
The availability of these functions enables more efficient :PEP:`590` vector
calls from binary extension modules that avoid argument boxing/unboxing
diff --git a/Misc/NEWS.d/3.6.0a1.rst b/Misc/NEWS.d/3.6.0a1.rst
index 53f09b3..98f1215 100644
--- a/Misc/NEWS.d/3.6.0a1.rst
+++ b/Misc/NEWS.d/3.6.0a1.rst
@@ -125,7 +125,7 @@ Setuptools 19.0.
.. section: Core and Builtins
Memory functions of the :c:func:`PyMem_Malloc` domain
-(:c:data:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator
+(:c:macro:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator
<pymalloc>` rather than system :c:func:`malloc`. Applications calling
:c:func:`PyMem_Malloc` without holding the GIL can now crash: use
``PYTHONMALLOC=debug`` environment variable to validate the usage of memory
diff --git a/Misc/NEWS.d/3.9.0a1.rst b/Misc/NEWS.d/3.9.0a1.rst
index 5ae1429..b97b7a5 100644
--- a/Misc/NEWS.d/3.9.0a1.rst
+++ b/Misc/NEWS.d/3.9.0a1.rst
@@ -5706,7 +5706,7 @@ and :c:func:`_PyObject_CallMethodOneArg`.
.. nonce: qZC0N_
.. section: C API
-The :const:`METH_FASTCALL` calling convention has been documented.
+The :c:macro:`METH_FASTCALL` calling convention has been documented.
..