| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d363eb5 commit abec9a1
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,20 +147,21 @@ type. | |||
| 147 | 147 | ||
| 148 | 148 | Contains the meta information of a struct sequence type to create. | |
| 149 | 149 | ||
| 150 | - +-------------------+------------------------------+--------------------------------------+ | ||
| 151 | - | Field | C Type | Meaning | | ||
| 152 | - +===================+==============================+======================================+ | ||
| 153 | - | ``name`` | ``const char *`` | name of the struct sequence type | | ||
| 154 | - +-------------------+------------------------------+--------------------------------------+ | ||
| 155 | - | ``doc`` | ``const char *`` | pointer to docstring for the type | | ||
| 156 | - | | | or ``NULL`` to omit | | ||
| 157 | - +-------------------+------------------------------+--------------------------------------+ | ||
| 158 | - | ``fields`` | ``PyStructSequence_Field *`` | pointer to ``NULL``-terminated array | | ||
| 159 | - | | | with field names of the new type | | ||
| 160 | - +-------------------+------------------------------+--------------------------------------+ | ||
| 161 | - | ``n_in_sequence`` | ``int`` | number of fields visible to the | | ||
| 162 | - | | | Python side (if used as tuple) | | ||
| 163 | - +-------------------+------------------------------+--------------------------------------+ | ||
| 150 | + .. c:member:: const char *name | ||
| 151 | + | ||
| 152 | + Name of the struct sequence type. | ||
| 153 | + | ||
| 154 | + .. c:member:: const char *doc | ||
| 155 | + | ||
| 156 | + Pointer to docstring for the type or ``NULL`` to omit. | ||
| 157 | + | ||
| 158 | + .. c:member:: PyStructSequence_Field *fields | ||
| 159 | + | ||
| 160 | + Pointer to ``NULL``-terminated array with field names of the new type. | ||
| 161 | + | ||
| 162 | + .. c:member:: int n_in_sequence | ||
| 163 | + | ||
| 164 | + Number of fields visible to the Python side (if used as tuple). | ||
| 164 | 165 | ||
| 165 | 166 | ||
| 166 | 167 | .. c:type:: PyStructSequence_Field | |
@@ -171,16 +172,14 @@ type. | |||
| 171 | 172 | the :c:type:`PyStructSequence_Desc` determines which | |
| 172 | 173 | field of the struct sequence is described. | |
| 173 | 174 | ||
| 174 | - +-----------+------------------+-----------------------------------------+ | ||
| 175 | - | Field | C Type | Meaning | | ||
| 176 | - +===========+==================+=========================================+ | ||
| 177 | - | ``name`` | ``const char *`` | name for the field or ``NULL`` to end | | ||
| 178 | - | | | the list of named fields, set to | | ||
| 179 | - | | | :c:data:`PyStructSequence_UnnamedField` | | ||
| 180 | - | | | to leave unnamed | | ||
| 181 | - +-----------+------------------+-----------------------------------------+ | ||
| 182 | - | ``doc`` | ``const char *`` | field docstring or ``NULL`` to omit | | ||
| 183 | - +-----------+------------------+-----------------------------------------+ | ||
| 175 | + .. c:member:: const char *name | ||
| 176 | + | ||
| 177 | + Name for the field or ``NULL`` to end the list of named fields, | ||
| 178 | + set to :c:data:`PyStructSequence_UnnamedField` to leave unnamed. | ||
| 179 | + | ||
| 180 | + .. c:member:: const char *doc | ||
| 181 | + | ||
| 182 | + Field docstring or ``NULL`` to omit. | ||
| 184 | 183 | ||
| 185 | 184 | ||
| 186 | 185 | .. c:var:: const char * const PyStructSequence_UnnamedField | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1513,21 +1513,23 @@ and :c:data:`PyType_Type` effectively act as defaults.) | |||
| 1513 | 1513 | The following constants are defined to be used as the third argument for | |
| 1514 | 1514 | :c:member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`: | |
| 1515 | 1515 | ||
| 1516 | - +------------------+------------+ | ||
| 1517 | - | Constant | Comparison | | ||
| 1518 | - +==================+============+ | ||
| 1519 | - | :c:macro:`Py_LT` | ``<`` | | ||
| 1520 | - +------------------+------------+ | ||
| 1521 | - | :c:macro:`Py_LE` | ``<=`` | | ||
| 1522 | - +------------------+------------+ | ||
| 1523 | - | :c:macro:`Py_EQ` | ``==`` | | ||
| 1524 | - +------------------+------------+ | ||
| 1525 | - | :c:macro:`Py_NE` | ``!=`` | | ||
| 1526 | - +------------------+------------+ | ||
| 1527 | - | :c:macro:`Py_GT` | ``>`` | | ||
| 1528 | - +------------------+------------+ | ||
| 1529 | - | :c:macro:`Py_GE` | ``>=`` | | ||
| 1530 | - +------------------+------------+ | ||
| 1516 | + .. c:namespace:: NULL | ||
| 1517 | + | ||
| 1518 | + +--------------------+------------+ | ||
| 1519 | + | Constant | Comparison | | ||
| 1520 | + +====================+============+ | ||
| 1521 | + | .. c:macro:: Py_LT | ``<`` | | ||
| 1522 | + +--------------------+------------+ | ||
| 1523 | + | .. c:macro:: Py_LE | ``<=`` | | ||
| 1524 | + +--------------------+------------+ | ||
| 1525 | + | .. c:macro:: Py_EQ | ``==`` | | ||
| 1526 | + +--------------------+------------+ | ||
| 1527 | + | .. c:macro:: Py_NE | ``!=`` | | ||
| 1528 | + +--------------------+------------+ | ||
| 1529 | + | .. c:macro:: Py_GT | ``>`` | | ||
| 1530 | + +--------------------+------------+ | ||
| 1531 | + | .. c:macro:: Py_GE | ``>=`` | | ||
| 1532 | + +--------------------+------------+ | ||
| 1531 | 1533 | ||
| 1532 | 1534 | The following macro is defined to ease writing rich comparison functions: | |
| 1533 | 1535 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,6 @@ Doc/c-api/set.rst | |||
| 23 | 23 | Doc/c-api/stable.rst | |
| 24 | 24 | Doc/c-api/structures.rst | |
| 25 | 25 | Doc/c-api/sys.rst | |
| 26 | - Doc/c-api/tuple.rst | ||
| 27 | 26 | Doc/c-api/type.rst | |
| 28 | 27 | Doc/c-api/typeobj.rst | |
| 29 | 28 | Doc/c-api/unicode.rst | |
| Back | FazBrowse Home | New Git URL |
0 commit comments