Skip to content

Commit fc600e4

Browse files
miss-islingtonczinckStanFromIreland
authored
[3.13] gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (GH-151058) (#151071)
(cherry picked from commit a187330) Co-authored-by: Christian Zinck <christian.zinck@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 743482a commit fc600e4

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

Doc/c-api/typeobj.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
611611
argument, and store in the instance's :c:member:`~PyVarObject.ob_size` field.
612612
Note that the :c:member:`~PyVarObject.ob_size` field may later be used for
613613
other purposes. For example, :py:type:`int` instances use the bits of
614-
:c:member:`~PyVarObject.ob_size` in an implementation-defined
615-
way; the underlying storage and its size should be accessed using
616-
:c:func:`PyLong_Export`.
614+
:c:member:`~PyVarObject.ob_size` in an implementation-defined way.
617615

618616
.. note::
619617

@@ -2745,24 +2743,24 @@ Buffer Object Structures
27452743
steps:
27462744

27472745
(1) Check if the request can be met. If not, raise :exc:`BufferError`,
2748-
set :c:expr:`view->obj` to ``NULL`` and return ``-1``.
2746+
set ``view->obj`` to ``NULL`` and return ``-1``.
27492747

27502748
(2) Fill in the requested fields.
27512749

27522750
(3) Increment an internal counter for the number of exports.
27532751

2754-
(4) Set :c:expr:`view->obj` to *exporter* and increment :c:expr:`view->obj`.
2752+
(4) Set ``view->obj`` to *exporter* and increment ``view->obj``.
27552753

27562754
(5) Return ``0``.
27572755

27582756
If *exporter* is part of a chain or tree of buffer providers, two main
27592757
schemes can be used:
27602758

27612759
* Re-export: Each member of the tree acts as the exporting object and
2762-
sets :c:expr:`view->obj` to a new reference to itself.
2760+
sets ``view->obj`` to a new reference to itself.
27632761

27642762
* Redirect: The buffer request is redirected to the root object of the
2765-
tree. Here, :c:expr:`view->obj` will be a new reference to the root
2763+
tree. Here, ``view->obj`` will be a new reference to the root
27662764
object.
27672765

27682766
The individual fields of *view* are described in section
@@ -2806,7 +2804,7 @@ Buffer Object Structures
28062804
*view* argument.
28072805

28082806

2809-
This function MUST NOT decrement :c:expr:`view->obj`, since that is
2807+
This function MUST NOT decrement ``view->obj``, since that is
28102808
done automatically in :c:func:`PyBuffer_Release` (this scheme is
28112809
useful for breaking reference cycles).
28122810

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Doc/c-api/init_config.rst
88
Doc/c-api/intro.rst
99
Doc/c-api/module.rst
1010
Doc/c-api/stable.rst
11-
Doc/c-api/typeobj.rst
1211
Doc/library/ast.rst
1312
Doc/library/asyncio-extending.rst
1413
Doc/library/asyncio-policy.rst

0 commit comments

Comments
 (0)