diff options
author | Inada Naoki <songofacandy@gmail.com> | 2023-07-02 15:54:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 15:54:35 (GMT) |
commit | 20b7c79b9d67a761aaf818d3b92498ea0b0d80d9 (patch) | |
tree | f4f2065b7712b8aae44f4f000bcddd60d64ecafc /Doc/extending/extending.rst | |
parent | 5950e7dbfcd9307c7e74184a1586ef99f9f35c3b (diff) | |
download | cpython-20b7c79b9d67a761aaf818d3b92498ea0b0d80d9.zip cpython-20b7c79b9d67a761aaf818d3b92498ea0b0d80d9.tar.gz cpython-20b7c79b9d67a761aaf818d3b92498ea0b0d80d9.tar.bz2 |
gh-104922: Doc: add note about PY_SSIZE_T_CLEAN (#106314)
Add note about PY_SSIZE_T_CLEAN in extending and embedding document.
Diffstat (limited to 'Doc/extending/extending.rst')
-rw-r--r-- | Doc/extending/extending.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index ef93848..7d08bb9 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -69,8 +69,10 @@ the module and a copyright notice if you like). 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-string-and-buffers` for a description of this macro. + ``#define PY_SSIZE_T_CLEAN`` was used to indicate that ``Py_ssize_t`` should be + used in some APIs instead of ``int``. + It is not necessary since Python 3.13, but we keep it here for backward compatibility. + 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 |