Doc: define PY_SSIZE_T_CLEAN always (GH-12794)
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst
index 6bb2356..69aef0d 100644
--- a/Doc/c-api/intro.rst
+++ b/Doc/c-api/intro.rst
@@ -48,7 +48,8 @@
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 @@
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