Skip to content

Commit

Permalink
pythongh-107298: Document doesn't link to PyAPI_DATA()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vstinner committed Sep 11, 2023
1 parent 1ee50e2 commit c3ac141
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ Example on Linux x86-64::
At the beginning of the files, C extensions are built as built-in modules.
Extensions defined after the ``*shared*`` marker are built as dynamic libraries.

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

* Use ``Py_EXPORTED_SYMBOL`` if the ``Py_BUILD_CORE_MODULE`` is defined
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/2.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ Changes to Python's build process and to the C API include:
* The :c:macro:`!DL_EXPORT` and :c:macro:`!DL_IMPORT` macros are now deprecated.
Initialization functions for Python extension modules should now be declared
using the new macro :c:macro:`PyMODINIT_FUNC`, while the Python core will
generally use the :c:macro:`PyAPI_FUNC` and :c:macro:`PyAPI_DATA` macros.
generally use the :c:macro:`!PyAPI_FUNC` and :c:macro:`!PyAPI_DATA` macros.

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

0 comments on commit c3ac141

Please sign in to comment.