Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Doc/extending/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ the module and a copyright notice if you like).
See :ref:`arg-parsing-string-and-buffers` for a description of this macro.

All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` or
``PY``, except those defined in standard header files. For convenience, and
since they are used extensively by the Python interpreter, ``"Python.h"``
includes a few standard header files: ``<stdio.h>``, ``<string.h>``,
``<errno.h>``, and ``<stdlib.h>``. If the latter header file does not exist on
your system, it declares the functions :c:func:`malloc`, :c:func:`free` and
:c:func:`realloc` directly.
``PY``, except those defined in standard header files.

Note that :file:`Python.h` excludes ``<stdio.h>``, ``<string.h>``, ``<errno.h>``, and ``<stdlib.h>`` as they are not used by
Python anymore. For backward compatibility of existing third party C extensions, they will
be included if Py_LIMITED_API is not defined and for limited C API version 3.10 and older.
The ``<ctype.h>`` and ``<unistd.h>`` headers are also not included for limited C API version 3.13 and newer.


The next thing we add to our module file is the C function that will be called
when the Python expression ``spam.system(string)`` is evaluated (we'll see
Expand Down
Loading