gh-106919: Use role :c:macro: for referencing the C "constants" (GH-106920)

This commit is contained in:
Serhiy Storchaka 2023-07-21 10:52:07 +03:00 committed by GitHub
parent 81861fd90b
commit fcc816dbff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 311 additions and 293 deletions

View file

@ -145,7 +145,7 @@ or request "multi-phase initialization" by returning the definition struct itsel
.. c:member:: PyModuleDef_Base m_base
Always initialize this member to :const:`PyModuleDef_HEAD_INIT`.
Always initialize this member to :c:data:`PyModuleDef_HEAD_INIT`.
.. c:member:: const char *m_name
@ -256,7 +256,7 @@ of the following two module creation functions:
Create a new module object, given the definition in *def*. This behaves
like :c:func:`PyModule_Create2` with *module_api_version* set to
:const:`PYTHON_API_VERSION`.
:c:macro:`PYTHON_API_VERSION`.
.. c:function:: PyObject* PyModule_Create2(PyModuleDef *def, int module_api_version)
@ -390,7 +390,7 @@ objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and
Create a new module object, given the definition in *def* and the
ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2`
with *module_api_version* set to :const:`PYTHON_API_VERSION`.
with *module_api_version* set to :c:macro:`PYTHON_API_VERSION`.
.. versionadded:: 3.5