GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.11] gh-107298: Docs: add targets for some :c:member: and :c:macro:… · serhiy-storchaka/cpython@59cfa09

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Doc/c-api
    • tuple.rst
    • typeobj.rst
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/c-api/tuple.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/tuple.rst
+23-24Lines changed: 23 additions & 24 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -144,20 +144,21 @@ type.
144144
145145
Contains the meta information of a struct sequence type to create.
146146
147-
+-------------------+------------------------------+--------------------------------------+
148-
| Field | C Type | Meaning |
149-
+===================+==============================+======================================+
150-
| ``name`` | ``const char *`` | name of the struct sequence type |
151-
+-------------------+------------------------------+--------------------------------------+
152-
| ``doc`` | ``const char *`` | pointer to docstring for the type |
153-
| | | or ``NULL`` to omit |
154-
+-------------------+------------------------------+--------------------------------------+
155-
| ``fields`` | ``PyStructSequence_Field *`` | pointer to ``NULL``-terminated array |
156-
| | | with field names of the new type |
157-
+-------------------+------------------------------+--------------------------------------+
158-
| ``n_in_sequence`` | ``int`` | number of fields visible to the |
159-
| | | Python side (if used as tuple) |
160-
+-------------------+------------------------------+--------------------------------------+
147+
.. c:member:: const char *name
148+
149+
Name of the struct sequence type.
150+
151+
.. c:member:: const char *doc
152+
153+
Pointer to docstring for the type or ``NULL`` to omit.
154+
155+
.. c:member:: PyStructSequence_Field *fields
156+
157+
Pointer to ``NULL``-terminated array with field names of the new type.
158+
159+
.. c:member:: int n_in_sequence
160+
161+
Number of fields visible to the Python side (if used as tuple).
161162
162163
163164
.. c:type:: PyStructSequence_Field
@@ -167,16 +168,14 @@ type.
167168
:attr:`fields` array of the :c:type:`PyStructSequence_Desc` determines which
168169
field of the struct sequence is described.
169170
170-
+-----------+------------------+-----------------------------------------+
171-
| Field | C Type | Meaning |
172-
+===========+==================+=========================================+
173-
| ``name`` | ``const char *`` | name for the field or ``NULL`` to end |
174-
| | | the list of named fields, set to |
175-
| | | :c:data:`PyStructSequence_UnnamedField` |
176-
| | | to leave unnamed |
177-
+-----------+------------------+-----------------------------------------+
178-
| ``doc`` | ``const char *`` | field docstring or ``NULL`` to omit |
179-
+-----------+------------------+-----------------------------------------+
171+
.. c:member:: const char *name
172+
173+
Name for the field or ``NULL`` to end the list of named fields,
174+
set to :c:data:`PyStructSequence_UnnamedField` to leave unnamed.
175+
176+
.. c:member:: const char *doc
177+
178+
Field docstring or ``NULL`` to omit.
180179
181180
182181
.. c:var:: const char * const PyStructSequence_UnnamedField
Collapse file

‎Doc/c-api/typeobj.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/typeobj.rst
+17-15Lines changed: 17 additions & 15 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1449,21 +1449,23 @@ and :c:data:`PyType_Type` effectively act as defaults.)
14491449
The following constants are defined to be used as the third argument for
14501450
:c:member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:
14511451

1452-
+------------------+------------+
1453-
| Constant | Comparison |
1454-
+==================+============+
1455-
| :c:macro:`Py_LT` | ``<`` |
1456-
+------------------+------------+
1457-
| :c:macro:`Py_LE` | ``<=`` |
1458-
+------------------+------------+
1459-
| :c:macro:`Py_EQ` | ``==`` |
1460-
+------------------+------------+
1461-
| :c:macro:`Py_NE` | ``!=`` |
1462-
+------------------+------------+
1463-
| :c:macro:`Py_GT` | ``>`` |
1464-
+------------------+------------+
1465-
| :c:macro:`Py_GE` | ``>=`` |
1466-
+------------------+------------+
1452+
.. c:namespace:: NULL
1453+
1454+
+--------------------+------------+
1455+
| Constant | Comparison |
1456+
+====================+============+
1457+
| .. c:macro:: Py_LT | ``<`` |
1458+
+--------------------+------------+
1459+
| .. c:macro:: Py_LE | ``<=`` |
1460+
+--------------------+------------+
1461+
| .. c:macro:: Py_EQ | ``==`` |
1462+
+--------------------+------------+
1463+
| .. c:macro:: Py_NE | ``!=`` |
1464+
+--------------------+------------+
1465+
| .. c:macro:: Py_GT | ``>`` |
1466+
+--------------------+------------+
1467+
| .. c:macro:: Py_GE | ``>=`` |
1468+
+--------------------+------------+
14671469

14681470
The following macro is defined to ease writing rich comparison functions:
14691471

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.