mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Doc: define PY_SSIZE_T_CLEAN always (GH-12794)
This commit is contained in:
parent
a304b136ad
commit
c88feceb44
10 changed files with 22 additions and 4 deletions
|
|
@ -48,7 +48,8 @@ Include Files
|
|||
All function, type and macro definitions needed to use the Python/C API are
|
||||
included in your code by the following line::
|
||||
|
||||
#include "Python.h"
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
This implies inclusion of the following standard headers: ``<stdio.h>``,
|
||||
``<string.h>``, ``<errno.h>``, ``<limits.h>``, ``<assert.h>`` and ``<stdlib.h>``
|
||||
|
|
@ -60,6 +61,9 @@ This implies inclusion of the following standard headers: ``<stdio.h>``,
|
|||
headers on some systems, you *must* include :file:`Python.h` before any standard
|
||||
headers are included.
|
||||
|
||||
It is recommended to always define ``PY_SSIZE_T_CLEAN`` before including
|
||||
``Python.h``. See :ref:`arg-parsing` for a description of this macro.
|
||||
|
||||
All user visible names defined by Python.h (except those defined by the included
|
||||
standard headers) have one of the prefixes ``Py`` or ``_Py``. Names beginning
|
||||
with ``_Py`` are for internal use by the Python implementation and should not be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue