]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-121617: Include <string.h> for Py_CLEAR() macro (#144666)
authorVictor Stinner <vstinner@python.org>
Thu, 12 Feb 2026 16:03:55 +0000 (17:03 +0100)
committerGitHub <noreply@github.com>
Thu, 12 Feb 2026 16:03:55 +0000 (17:03 +0100)
commit9e5e1f9988faee0a18969d4d7dda6a3e4eaf850b
tree45b7630fdb878f72bf0135a1a38b13c94eba843a
parenteb6ebdbc95aa8d62ac3169e72aac164a21c5679c
gh-121617: Include <string.h> for Py_CLEAR() macro (#144666)

Python.h now also includes <string.h> in the limited C API version 3.11
and newer to fix the Py_CLEAR() macro which uses memcpy().

Add a Py_CLEAR() test in test_cext.

Modify also _Py_TYPEOF to use C23 typeof() if available.
Doc/c-api/intro.rst
Include/Python.h
Include/pyport.h
Lib/test/test_cext/extension.c
Misc/NEWS.d/next/C_API/2026-02-10-14-49-49.gh-issue-121617.57vMqa.rst [new file with mode: 0644]