]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-119613: Soft deprecate the Py_MEMCPY() macro (#120020)
authorVictor Stinner <vstinner@python.org>
Tue, 4 Jun 2024 09:23:55 +0000 (11:23 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 09:23:55 +0000 (09:23 +0000)
Use directly memcpy() instead.

Include/pyport.h
Misc/NEWS.d/next/C API/2024-06-04-10-58-20.gh-issue-119613.qOr9GF.rst [new file with mode: 0644]

index 2ba81a4be42822655aaae94d675eae59a80d150f..1f7a9b41e0ae2b387abd7e1557fe427dda6daa64 100644 (file)
@@ -180,6 +180,7 @@ typedef Py_ssize_t Py_ssize_clean_t;
 #  define Py_LOCAL_INLINE(type) static inline type
 #endif
 
+// Soft deprecated since Python 3.14, use memcpy() instead.
 #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
 #  define Py_MEMCPY memcpy
 #endif
diff --git a/Misc/NEWS.d/next/C API/2024-06-04-10-58-20.gh-issue-119613.qOr9GF.rst b/Misc/NEWS.d/next/C API/2024-06-04-10-58-20.gh-issue-119613.qOr9GF.rst
new file mode 100644 (file)
index 0000000..11f075b
--- /dev/null
@@ -0,0 +1,2 @@
+Soft deprecate the :c:macro:`!Py_MEMCPY` macro: use directly ``memcpy()``
+instead.  Patch by Victor Stinner.