From: Victor Stinner Date: Tue, 4 Jun 2024 09:23:55 +0000 (+0200) Subject: gh-119613: Soft deprecate the Py_MEMCPY() macro (#120020) X-Git-Tag: v3.14.0a1~1617 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26e5c6e8351adb1a77a88920ff33fc8ebee9a99e;p=thirdparty%2FPython%2Fcpython.git gh-119613: Soft deprecate the Py_MEMCPY() macro (#120020) Use directly memcpy() instead. --- diff --git a/Include/pyport.h b/Include/pyport.h index 2ba81a4be428..1f7a9b41e0ae 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -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 index 000000000000..11f075b79e6f --- /dev/null +++ b/Misc/NEWS.d/next/C API/2024-06-04-10-58-20.gh-issue-119613.qOr9GF.rst @@ -0,0 +1,2 @@ +Soft deprecate the :c:macro:`!Py_MEMCPY` macro: use directly ``memcpy()`` +instead. Patch by Victor Stinner.