Skip to content

Commit c3ac141

Browse files
committed
pythongh-107298: Document doesn't link to PyAPI_DATA()
Remove links to PyAPI_FUNC(), PyAPI_DATA() and PyMODINIT_FUNC macros since they are not documented. These macros should only be used to define the Python C API. They should not be used outside Python code base.
1 parent 1ee50e2 commit c3ac141

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/using/configure.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,8 @@ Example on Linux x86-64::
855855
At the beginning of the files, C extensions are built as built-in modules.
856856
Extensions defined after the ``*shared*`` marker are built as dynamic libraries.
857857

858-
The :c:macro:`PyAPI_FUNC()`, :c:macro:`PyAPI_DATA()` and
859-
:c:macro:`PyMODINIT_FUNC` macros of :file:`Include/pyport.h` are defined
858+
The :c:macro:`!PyAPI_FUNC()`, :c:macro:`!PyAPI_DATA()` and
859+
:c:macro:`!PyMODINIT_FUNC` macros of :file:`Include/exports.h` are defined
860860
differently depending if the ``Py_BUILD_CORE_MODULE`` macro is defined:
861861

862862
* Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined

Doc/whatsnew/2.3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ Changes to Python's build process and to the C API include:
18891889
* The :c:macro:`!DL_EXPORT` and :c:macro:`!DL_IMPORT` macros are now deprecated.
18901890
Initialization functions for Python extension modules should now be declared
18911891
using the new macro :c:macro:`PyMODINIT_FUNC`, while the Python core will
1892-
generally use the :c:macro:`PyAPI_FUNC` and :c:macro:`PyAPI_DATA` macros.
1892+
generally use the :c:macro:`!PyAPI_FUNC` and :c:macro:`!PyAPI_DATA` macros.
18931893

18941894
* The interpreter can be compiled without any docstrings for the built-in
18951895
functions and modules by supplying :option:`!--without-doc-strings` to the

0 commit comments

Comments
 (0)